Commit Graph

151629 Commits

Author SHA1 Message Date
Mike Blumenkrantz 49a20e0981 zink: start a unified driver workarounds struct
eventually anything that checks driverID should be moved here for ease of
reference/updating

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15392>
2022-03-21 22:58:11 -04:00
Mike Blumenkrantz 0a80f94de0 zink: force disable rasterization discard if primgen query is active
this query requires rasterization to pass the clipping invocations stage,
which means discard is impossible

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15392>
2022-03-21 22:58:11 -04:00
Mike Blumenkrantz 795925e0ff zink: hook up EXT_color_write_enable
no functional changes

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15392>
2022-03-21 22:58:11 -04:00
Qiang Yu 9401990e6f nir/linker: set varying from uniform as flat
Flat varying can save some rasterization compute cost
and register needed by shader.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15341>
2022-03-22 01:33:23 +00:00
Qiang Yu aaf951c47f lima: enable nir lower_varying_from_uniform
Mali GPU pass varying by memory, so enable this optimization.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15341>
2022-03-22 01:33:23 +00:00
Qiang Yu 2617e6c028 nir/linker: disable varying from uniform lowering by default
This fixes performance regression for Specviewperf/Energy
on AMD GPU. Other GPUs passing varying by memory may choose
to re-enable it as need.

Fixes: 2604625043 ("nir/linker: support uniform when optimizing varying")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15341>
2022-03-22 01:33:23 +00:00
Alyssa Rosenzweig b219e9a96e asahi: Port driver to macOS 12.x ABI
There's lots of reshuffling required. Nothing "interesting", though.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
2022-03-22 00:19:30 +00:00
Alyssa Rosenzweig 1c6e77bd04 asahi: Don't clobber clear colours
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
2022-03-22 00:19:30 +00:00
Alyssa Rosenzweig b3be6d5263 asahi: Handle flushes of depth-only rendering
Not totally right but this should be a start.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
2022-03-22 00:19:30 +00:00
Alyssa Rosenzweig a0197c16bc asahi: Wire in u_transfer_helper
We need it for emulating packed depth/stencil as separate depth/stencil
resources, populating separate_stencil for us as required.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
2022-03-22 00:19:30 +00:00
Alyssa Rosenzweig 3cd2833549 asahi: Generate IOGPU attachments dynamically
Take a pipe_framebuffer_state and go from there. We need some care to
handle separate stencil, but the logic is largely routine.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
2022-03-22 00:19:30 +00:00
Alyssa Rosenzweig 5d58d5caaf asahi: Add separate_stencil, internal_format fields
Currently unused, but will be set when u_transfer_helper is integrated
for emulating packed depth/stencil.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
2022-03-22 00:19:30 +00:00
Alyssa Rosenzweig 2c23bb49ef asahi: Add size field to slices
Needed to size attachments for the kernel... for some reason. We already
compute this; just save it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
2022-03-22 00:19:29 +00:00
Alyssa Rosenzweig f5ae88d36f asahi: Identify IOGPU_MISC data structure
This will be elaborated upon soon.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
2022-03-22 00:19:29 +00:00
Alyssa Rosenzweig d5ee1eacf1 asahi: Add stencil buffer attachment type
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
2022-03-22 00:19:29 +00:00
Alyssa Rosenzweig 50f9b4ceba asahi: Identify IOGPU Internal Pipelines structure
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
2022-03-22 00:19:29 +00:00
Alyssa Rosenzweig eb9da583d7 asahi: Identify aux framebuffer data structure
Total guess at the name.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
2022-03-22 00:19:29 +00:00
Alyssa Rosenzweig 535f1c1166 asahi: Identify IOGPU Clear Z/S structure
Not sure on the details yet but identify and dump the data structure to start.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
2022-03-22 00:19:29 +00:00
Yonggang Luo d9c3601e29 util: trim trailing space for files src/util/**/*
Using the following bash script doing that
```
cd src/util
find . -type f -print0 | xargs -0 -n1 sed -i 's/[ \t]*$//'
```

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15093>
2022-03-21 17:57:15 +00:00
Nanley Chery da82358a52 ci/anv: Changes from enabling 8/16bpp CCS more
- Fixes in dEQP-VK.dynamic_rendering.suballocation.multisample_resolve.*
- Fails in dEQP-VK.drm_format_modifiers.export_import.*

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15420>
2022-03-21 17:36:10 +00:00
Nanley Chery e2f0c859c2 Revert "anv: Disable CCS_E for some 8/16bpp copies on TGL+"
This reverts commit d68b2db89c.

With this change, no regressions have been observed with the
dEQP-VK.synchronization* test group. There are regressions with
dEQP-VK.drm_format_modifiers.export_import.*, but those have been
root-caused to be test issues (see 3575).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6125
Fixes: 57445adc89 ("anv: Re-enable CCS_E on TGL+")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15420>
2022-03-21 17:36:10 +00:00
Dylan Baker fe65c5671b gallium/opencl: set OCL_ICD_FILENAMES with devenv
So that `meson devenv` also sets up OpenCL.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15471>
2022-03-21 16:58:14 +00:00
Pavel Ondračka 19db6b760a r300: set PVS_LAST_VTX_SRC_INST properly to last input read
From docs:
The PVS Instruction which uses the Input Vertex Memory for the last
time. This value is used to free up the Input Vertex Slots ASAP.
This field must be set to a valid instruction.

Right now it is set to the last instruction. When the last read is
inside a loop, set it on the outhermost ENDLOOP. This could in theory
help performance, but none of my usual benchmarks including GLmark,
Unigine Sanctuary or Lightsmark show any measurable performance difference.

Suggested in: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6045

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15252>
2022-03-21 16:37:11 +00:00
Karol Herbst 43c3f4386b nir: fix nir_sweep for printf
I hit a memory corruption trying to implement printf for Rusticl

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15474>
2022-03-21 13:23:04 +00:00
Lionel Landwerlin 44555e7f2c ci: enable intel-clc on some platforms
We'll have to figure out the cross compiling strategy, in particular
for Android. But as it stands we can't have the target & host llvm
packages installed at the same time so we can't really compile it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Lionel Landwerlin beadd0cb24 ci: enable llvm on debian-release build
Needed for intel-clc.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Lionel Landwerlin 57dd9c66bd ci: add clang/spirv-tools/llvm-spirv packages to fedora container
Needed for intel-clc.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Lionel Landwerlin 9ca29c687b intel/clc: disable tool prior to Gfx12.5 platforms
This tool is currently only aimed at Gfx version 12.5+ with
COMPUTE_WALKER. We could make it work on earlier platforms but they
require pushing gl_SubgroupInvocation and the CLC code is missing the
back-end compiler set-up bits for that.

v2: Commit description by Jason

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Lionel Landwerlin c735c4ca85 intel/clc: specify supported extensions
Having everything ever known to man is confusing our SPIRV parser.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Lionel Landwerlin a29b1d5716 intel/clc: allow producing SPIRV files
Useful to debug the parser.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Lionel Landwerlin 77e929a527 intel/clc: allow multiple CL files to be compiled together
v2: use util_dynarray_append() (Jason)
    identation fixes (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Jason Ekstrand c15bf88f01 intel: Add a little OpenCL C compiler binary
v2: Fix up indentation (Marcin)
    s/gen/gfx/ (Marcin)
    Deal with fd closing in success/fail cases (Marin)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Lionel Landwerlin b1e7ce84cc meson: try to find clang-cpp before going through each module
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Lionel Landwerlin ec6e247a40 intel/fs: handle inline data on OpenCL style kernels
This is for Gfx12.5 with the COMPUTE_WALKER::Inline Data payload. We
do this in a similar way to the compute kernels.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Jason Ekstrand 4d8e788663 intel/kernel: Implement some Intel built-in functions
v2: Document mangled function names (Marcin)
    Fixup progress & metadata (Marcin)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Jason Ekstrand 346a7f14fb intel/compiler: Add code for compiling CL-style SPIR-V kernels
v2: simplify INTEL_DEBUG expressions (Marcin)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Jason Ekstrand 8c11912582 intel/debug: Dump KERNEL source when INTEL_DEBUG=cs
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Jason Ekstrand d1bddfba6b intel/nir: Add optimizations to help OpenCL-style kernels
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Lionel Landwerlin 4ec5da7270 intel/nir/fs: replace COMPUTE || KERNEL by gl_shader_stage_is_compute()
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Jason Ekstrand e9ff6f4f06 nir/print: Add support for generic pointers
The way they're handled is that deref->modes is treated as a bitfield of
possible modes.  Variables are required to have a specific mode and
derefs with deref_type_var are as well.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
2022-03-21 11:26:44 +00:00
Yonggang Luo 24bc6c51e1 glx/egl: improve dri null screen related error messages.
Convert from `failed to create dri screen` to more exact error message
for easier debugging

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15480>
2022-03-21 09:31:31 +00:00
Pierre-Eric Pelloux-Prayer 5b14a0e390 crocus: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
2022-03-21 09:47:58 +01:00
Pierre-Eric Pelloux-Prayer b83bbd6f7f d3d12: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
2022-03-21 09:47:58 +01:00
Pierre-Eric Pelloux-Prayer 42fe3c5815 etnaviv: replace opencoded slab_zalloc
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
2022-03-21 09:47:58 +01:00
Pierre-Eric Pelloux-Prayer f8cbbaff5f freedreno: replace opencoded slab_zalloc
Reviewed-by: Rob Clark <robdclark@chromium.org>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
2022-03-21 09:47:58 +01:00
Pierre-Eric Pelloux-Prayer 06b72f1e1a lima: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
2022-03-21 09:47:58 +01:00
Pierre-Eric Pelloux-Prayer 38aad273aa iris: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
2022-03-21 09:47:58 +01:00
Pierre-Eric Pelloux-Prayer 4e29299e2b v3d: replace opencoded slab_zalloc
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
2022-03-21 09:47:58 +01:00
Pierre-Eric Pelloux-Prayer af7117df71 vc4: replace opencoded slab_zalloc
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
2022-03-21 09:47:58 +01:00
Pierre-Eric Pelloux-Prayer ff1744ee27 virgl: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
2022-03-21 09:47:58 +01:00