Jesse Natalie [Fri, 21 Oct 2022 22:30:25 +0000 (15:30 -0700)]
gallium: Add screen methods for driver-private data on interop interface
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Jesse Natalie [Fri, 21 Oct 2022 22:15:30 +0000 (15:15 -0700)]
include: Add driver data to v2 of mesa_glinterop_device_info
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Jesse Natalie [Fri, 21 Oct 2022 21:52:41 +0000 (14:52 -0700)]
egl/wgl: Implement interop methods
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Jesse Natalie [Fri, 21 Oct 2022 21:48:27 +0000 (14:48 -0700)]
wgl: Implement interop methods
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Jesse Natalie [Fri, 21 Oct 2022 21:09:39 +0000 (14:09 -0700)]
egl/dri2: Implement the new flush method
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Jesse Natalie [Fri, 21 Oct 2022 21:04:47 +0000 (14:04 -0700)]
glx: Implement the new flush method
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Jesse Natalie [Fri, 21 Oct 2022 21:28:44 +0000 (14:28 -0700)]
dri: Implement the new flush method
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Jesse Natalie [Thu, 27 Oct 2022 23:46:26 +0000 (16:46 -0700)]
mesa/st: Implement the new flush method
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Jesse Natalie [Thu, 27 Oct 2022 23:46:10 +0000 (16:46 -0700)]
mesa/st: Split interop object lookup from export
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Jesse Natalie [Fri, 21 Oct 2022 21:25:51 +0000 (14:25 -0700)]
mesa: Make fence_sync not static
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Jesse Natalie [Fri, 21 Oct 2022 22:14:30 +0000 (15:14 -0700)]
include: Add a flush interop method
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Jesse Natalie [Fri, 21 Oct 2022 19:02:04 +0000 (12:02 -0700)]
mesa, dri2: Move interop helpers from dri2 to state tracker
They're not at all dri2 specific and we'll want to use them from wgl.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Jesse Natalie [Fri, 21 Oct 2022 19:03:36 +0000 (12:03 -0700)]
include: Add WGL version of GL interop extensions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
Alyssa Rosenzweig [Wed, 2 Nov 2022 17:10:25 +0000 (13:10 -0400)]
docs/new_features: Add Panfrost disk cache
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19474>
Rhys Perry [Thu, 13 Oct 2022 17:40:15 +0000 (18:40 +0100)]
radeonsi: increase gfx1100/gfx1101 physical vgprs
https://reviews.llvm.org/D134522
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18825>
Rhys Perry [Mon, 26 Sep 2022 16:18:48 +0000 (17:18 +0100)]
aco/gfx11: increase gfx1100/gfx1101 physical vgprs
https://reviews.llvm.org/D134522
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18825>
Rhys Perry [Mon, 26 Sep 2022 18:12:41 +0000 (19:12 +0100)]
ac/gpu_info: increase gfx1100/gfx1101 physical vgprs
https://reviews.llvm.org/D134522
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18825>
Rhys Perry [Mon, 26 Sep 2022 18:12:19 +0000 (19:12 +0100)]
radv: increase gfx1100/gfx1101 physical vgprs
https://reviews.llvm.org/D134522
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18825>
Alyssa Rosenzweig [Fri, 14 Oct 2022 16:32:26 +0000 (12:32 -0400)]
panfrost: Implement a disk cache
Wire up the Mesa shader disk cache into Panfrost. Coupled with the
precompiles from the previous patch, this should greatly reduce shader
recompile jank.
This is a bare bones implementation. Obvious future work includes:
- Caching internal (outside of Gallium) shaders
- Implement finalize_nir to reduce on disk size of shaders
That doesn't need to come in this patch.
This patch does shuffle some allocation patterns around to avoid extra
nir_shader_clones, but the result should be pretty clean.
---
Consider dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.* in the CTS.
With a cold cache:
44.11user 0.66system 0:45.44elapsed 98%CPU (0avgtext+0avgdata 267804maxresident)
k 0inputs+0outputs (130major+74725minor)pagefaults 0swaps
But with this commit and a warm cache:
4.07user 0.35system 0:04.56elapsed 96%CPU (0avgtext+0avgdata 211012maxresident)
k0inputs+0outputs (1major+49489minor)pagefaults 0swaps
That's an 11x improvement!
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 21:14:46 +0000 (17:14 -0400)]
panfrost: Precompile shaders
We have no vertex shader key, and unless legacy GL features are used, the
fragment shader key is known ahead-of-time. That means we can precompile shaders
at CSO create time, hopefully avoiding some draw-time jank.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 21:03:36 +0000 (17:03 -0400)]
panfrost: Precompile transform feedback program
This avoids the weird compiled_shader pointer inside of compiled_shader. Because
we don't have a nonempty vertex shader key, there will only ever be a single
transform feedback program per CSO.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 20:53:52 +0000 (16:53 -0400)]
panfrost: Make fixed_varying_mask a fragment-only key
This makes it clear that there are no VS variants.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 20:10:26 +0000 (16:10 -0400)]
panfrost: Use u_dynarray for variants
No need to open code our own "special" dynarray. Unify the graphics/compute CSO
creation to make this work without duplicating more code.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 19:44:48 +0000 (15:44 -0400)]
panfrost: Remove uncompiled_shader->active_variant
The active compiled shader (variant) is context state, it is inappropriate to
stash it on the uncompiled shader. Add compiled shader pointers to the context
and get rid of the active_variant mutation. Names from iris.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 19:34:37 +0000 (15:34 -0400)]
panfrost: Rename structs to panfrost_(un)compiled_shader
Consistency with other drivers, this makes the language less variant-centric.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 19:30:49 +0000 (15:30 -0400)]
panfrost: Remove unused req_input_mem copy
Cloverism.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 19:20:46 +0000 (15:20 -0400)]
panfrost: Merge pan_assemble.c into pan_shader.c
We now have a common place for the driver side of shader compilation. As a bonus
this gets rid of the old "assemble" name which hasn't been accurate since 2018
or so.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 19:13:52 +0000 (15:13 -0400)]
panfrost: Consolidate all shader compiling code
Compute and graphics shaders will need similar paths for the disk cache. Let's
consolidate the code to make it easier to work with.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 19:13:24 +0000 (15:13 -0400)]
panfrost: Remove bogus assert
Nothing enforces this except perhaps the implicit structure of shader keys.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 19:11:30 +0000 (15:11 -0400)]
panfrost: Move small compute functions to pan_context.c
So we can use pan_compute.c for just programs.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 19:03:52 +0000 (15:03 -0400)]
panfrost: Delete set_global_resources
Cloverism.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Fri, 14 Oct 2022 21:49:10 +0000 (17:49 -0400)]
panfrost: Don't use nir_variable to link varyings
NIR deemphasizes nir_variable. We want to transition off it. Instead of walking
the list of variables and playing games with the GLSL types to collect varying
information, walk the list of instructions and use the I/O semantics to collect
similar information.
In addition to avoiding the reliance on nir_variable, this fixes handling of
struct varyings under certain circumstances. Such programs are compiled by the
GLES3.1 CTS but not used, so without this fix, the affected tests would regress
when precompiling.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Wed, 2 Nov 2022 14:49:22 +0000 (10:49 -0400)]
panfrost: Don't allocate space for empty varyings
PIPE_FORMAT_NONE has a block size of 1, oddly, but we don't actually
need to allocate any space for it. This acts as a small optimization for
a few shaders with the new varying linker.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Sun, 16 Oct 2022 00:09:25 +0000 (20:09 -0400)]
pan/mdg: Use bifrost_nir_lower_store_component
Move the pass from the Bifrost compiler to the Midgard/Bifrost common code
directory, and take advantage of it on Midgard, where it fixes the same
tests as it fixed originally on Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Sat, 15 Oct 2022 19:08:05 +0000 (15:08 -0400)]
pan/mdg: Use .u32 for flat shading
This is simple and matches what we do on Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Sat, 15 Oct 2022 19:54:18 +0000 (15:54 -0400)]
pan/mdg: Don't pair ST_VARY.a32 with other instrs
For some reason, LD_ATTR/ST_VARY.a32 bundles raise INSTR_INVALID_ENC, at
least on Mali-T860. Don't construct such pairs. This is a blunt hack but
I don't know where this curveball requirement is coming from and this
unblocks the rest of this series.
total instructions in shared programs: 99879 -> 99788 (-0.09%)
instructions in affected programs: 3179 -> 3088 (-2.86%)
helped: 49
HURT: 9
helped stats (abs) min: 1.0 max: 6.0 x̄: 2.04 x̃: 2
helped stats (rel) min: 0.93% max: 10.53% x̄: 5.46% x̃: 4.88%
HURT stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
HURT stats (rel) min: 0.61% max: 2.13% x̄: 1.41% x̃: 1.14%
95% mean confidence interval for instructions value: -1.93 -1.20
95% mean confidence interval for instructions %-change: -5.37% -3.41%
Instructions are helped.
total bundles in shared programs: 43778 -> 45102 (3.02%)
bundles in affected programs: 10737 -> 12061 (12.33%)
helped: 10
HURT: 369
helped stats (abs) min: 1.0 max: 3.0 x̄: 1.50 x̃: 1
helped stats (rel) min: 2.90% max: 18.75% x̄: 6.93% x̃: 5.21%
HURT stats (abs) min: 1.0 max: 10.0 x̄: 3.63 x̃: 4
HURT stats (rel) min: 0.82% max: 44.44% x̄: 15.27% x̃: 13.33%
95% mean confidence interval for bundles value: 3.29 3.69
95% mean confidence interval for bundles %-change: 13.68% 15.69%
Bundles are HURT.
total quadwords in shared programs: 76783 -> 77914 (1.47%)
quadwords in affected programs: 18633 -> 19764 (6.07%)
helped: 9
HURT: 370
helped stats (abs) min: 1.0 max: 2.0 x̄: 1.22 x̃: 1
helped stats (rel) min: 0.87% max: 8.33% x̄: 3.71% x̃: 3.85%
HURT stats (abs) min: 1.0 max: 7.0 x̄: 3.09 x̃: 3
HURT stats (rel) min: 0.82% max: 35.00% x̄: 7.82% x̃: 6.11%
95% mean confidence interval for quadwords value: 2.82 3.15
95% mean confidence interval for quadwords %-change: 7.02% 8.06%
Quadwords are HURT.
total registers in shared programs: 7266 -> 7076 (-2.61%)
registers in affected programs: 1224 -> 1034 (-15.52%)
helped: 171
HURT: 25
helped stats (abs) min: 1.0 max: 3.0 x̄: 1.27 x̃: 1
helped stats (rel) min: 8.33% max: 50.00% x̄: 21.85% x̃: 20.00%
HURT stats (abs) min: 1.0 max: 2.0 x̄: 1.12 x̃: 1
HURT stats (rel) min: 10.00% max: 100.00% x̄: 35.73% x̃: 33.33%
95% mean confidence interval for registers value: -1.10 -0.84
95% mean confidence interval for registers %-change: -17.69% -11.32%
Registers are helped.
total threads in shared programs: 4956 -> 5019 (1.27%)
threads in affected programs: 99 -> 162 (63.64%)
helped: 43
HURT: 6
helped stats (abs) min: 1.0 max: 2.0 x̄: 1.74 x̃: 2
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
HURT stats (abs) min: 2.0 max: 2.0 x̄: 2.00 x̃: 2
HURT stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for threads value: 0.91 1.66
95% mean confidence interval for threads %-change: 67.36% 95.90%
Threads are helped.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Alyssa Rosenzweig [Sat, 15 Oct 2022 19:18:04 +0000 (15:18 -0400)]
pan/mdg: Disassemble the .a32 bit
Corresponds to .auto32 on Bifrost. This is helpful for a conformant
implementation of flat shading.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
Rob Clark [Sun, 30 Oct 2022 18:58:47 +0000 (11:58 -0700)]
freedreno/a6xx: Mark gl45 supported
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Sun, 30 Oct 2022 18:19:48 +0000 (11:19 -0700)]
freedreno/a6xx: ARB_query_buffer_object support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Sun, 30 Oct 2022 17:24:20 +0000 (10:24 -0700)]
freedreno: Core ARB_query_buffer_object support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Tue, 1 Nov 2022 00:25:04 +0000 (17:25 -0700)]
freedreno/batch: Add a global epilogue
Rename the existing one to make it clear that it is per-tile, and add a
new one that runs after all the tile passes. Will be needed in the next
commit.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Sun, 30 Oct 2022 16:23:52 +0000 (09:23 -0700)]
freedreno/a5xx+a6xx: Add base class for query samples
For PIPE_CAP_QUERY_BUFFER_OBJECT we'll need to write on the GPU a flag
when the query result is available, which means the buffers used for
query results should have a header with availability flag.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Mon, 31 Oct 2022 18:39:58 +0000 (11:39 -0700)]
freedreno/a6xx: Remove unused field
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Mon, 31 Oct 2022 18:35:57 +0000 (11:35 -0700)]
freedreno/a6xx: Fix occlusion queries
WFI is not a strong enough barrier, which shows up in piglit qbo tests
which do a single draw.
Fixes:
13fc03f4c0e ("freedreno/a6xx: Avoid stalling for occlusion queries")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Sat, 29 Oct 2022 20:28:33 +0000 (13:28 -0700)]
freedreno/a6xx: Enable ARB_shader_group_vote
Already supported for at least a6xx.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Sat, 29 Oct 2022 21:45:51 +0000 (14:45 -0700)]
freedreno/ir3: Unconditionally lower subgroup ops
For devices that don't support getfiberid, we force the subgroup size
to 1 for things other than compute stage. This matches what zink does.
And fixes spec@arb_shader_group_vote@vs-eq-uniform once we expose
ARB_shader_group_vote.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Sat, 29 Oct 2022 20:23:16 +0000 (13:23 -0700)]
freedreno/a3xx+: Enable ARB_derivative_control
Also already supported by ir3.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Sat, 29 Oct 2022 20:19:41 +0000 (13:19 -0700)]
freedreno/a3xx+: Enable ARB_shader_texture_image_samples
This is already supported for ir3
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Sat, 29 Oct 2022 19:41:01 +0000 (12:41 -0700)]
freedreno/a6xx: Implement ARB_clear_texture
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Sat, 29 Oct 2022 19:17:07 +0000 (12:17 -0700)]
freedreno/a6xx: Use box to pass 2d clear params
Simplifies the interface slightly and makes it possible to re-use the
path for pctx->clear_texture() in the next commit. The z dimensions
still come from the surface.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rob Clark [Sat, 29 Oct 2022 17:59:18 +0000 (10:59 -0700)]
freedreno: Add ARB_gl_spirv support
All the heavy lifting is done in nir.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
Rhys Perry [Wed, 2 Nov 2022 15:09:38 +0000 (15:09 +0000)]
docs: update new_features.txt for non-extension additions to RADV
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19469>
Erik Faye-Lund [Wed, 2 Nov 2022 09:29:10 +0000 (10:29 +0100)]
zink: put union fields into structs named by the shader-stages
This makes it easier to see that a field is only valid in a given stage,
to avoid undefined behavior.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19457>
Erik Faye-Lund [Wed, 2 Nov 2022 09:21:43 +0000 (10:21 +0100)]
zink: do not read is_generated unless in tcs shader
It's undefined behavior in C to read a union member if another member
has been written to more recently. Let's be more careful here!
Fixes:
a9d2b86c2c8 ("zink: store the spirv_shader to the zink_shader struct for generated tcs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19457>
Erik Faye-Lund [Tue, 1 Nov 2022 13:08:09 +0000 (14:08 +0100)]
zink: consider polygon-mode for rast_prim
But because polygon-offset needs to consider the primitive-type *before*
overriding the type, add a zink_prim_type()-helper for the partially
resolved state.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19438>
Erik Faye-Lund [Wed, 2 Nov 2022 12:40:32 +0000 (13:40 +0100)]
zink: only set line-width if drawing lines
This might seem like a premature optimization, but it's going to make a
bit more sense with the next commit, to prevent needlessly regressing
performance.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19438>
Erik Faye-Lund [Tue, 1 Nov 2022 12:30:27 +0000 (13:30 +0100)]
zink: correct depth-bias enable condition
This should be based on the fill_mode, not on the primitive type. We
*also* need to check if we'll rasterize triangles in the end, though.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19438>
Adam Jackson [Fri, 28 Oct 2022 16:28:09 +0000 (12:28 -0400)]
rusticl: meson devenv support
This gets 'meson devenv -C build clinfo' working on iris for me.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19451>
Rhys Perry [Thu, 29 Sep 2022 13:22:16 +0000 (14:22 +0100)]
radv/llvm: fix GS shaders on GFX8/9
6698753cdb6 switched our GS output stores to use MUBUF.
The stride doesn't matter for the ESGS descriptor (because idxen=false and
the index stride is 64), but this fixes it anyway.
This also changes ACO to use MUBUF store too, since MTBUF doesn't seem to
work correctly with an invalid data format in the descriptor.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes:
6698753cdb6 ("ac/llvm: don't use tbuffer_store as a fallback for swizzled stores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18885>
Joan Bruguera [Tue, 1 Nov 2022 22:01:50 +0000 (23:01 +0100)]
nv50/ir/nir: ignore sampler for TXF/TXQ ops.
Recently, a regression was reported where videos in Firefox had shifted/
glitched colors on certain Kepler hardware. This was bisected to
bf02bffe156214dad942f56ee68c380d1968704f, however, the issue already
existed but didn't hit users until TGSI was switched to NIR as default.
The issue was traced to a YUV-to-RGB fragment shader used by Firefox,
which uses three samplers for the Y/U/V components. The Y component was
handled correctly, but the U/V components were bogus, causing the issue.
After analysis, it appears the TXF/TXQ ops. should only handle the texture
(r) but not the sampler (s), see
63b850403c90f33c295d3ad6be4ad749d4ea6274
and
346ce0b98832e33d5411200002571b3edea9e2bb.
Similarly, handleTXQ/handleTXF on nv50_ir_from_tgsi always sets s=0.
Only Kepler was affected because other hardware ignores s at codegen.
Always set s=0 on NIR for TXF/TXQ, to keep TGSI behavior and fix the
regression.
Thanks: Karol Herbst and M Henning for help diagnosing the issue.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7416
Cc: mesa-stable
Suggested-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19453>
Yonggang Luo [Wed, 2 Nov 2022 10:10:08 +0000 (18:10 +0800)]
android: -Ddri-drivers= is not needed anymore
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19462>
Yonggang Luo [Wed, 2 Nov 2022 10:09:07 +0000 (18:09 +0800)]
docs: There is no more swrast driver
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19459>
Yonggang Luo [Wed, 2 Nov 2022 10:08:24 +0000 (18:08 +0800)]
docs: There is only glx=xlib option now
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19459>
Yonggang Luo [Wed, 2 Nov 2022 10:05:23 +0000 (18:05 +0800)]
docs: -Ddri-drivers= option is deprecated, do not use it anymore
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19459>
Erik Faye-Lund [Tue, 25 Oct 2022 10:38:02 +0000 (12:38 +0200)]
docs: fixup rebase mistake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19296>
Pierre-Eric Pelloux-Prayer [Wed, 26 Oct 2022 16:28:39 +0000 (18:28 +0200)]
radeonsi: update db_eqaa even if msaa is disabled
This seems to fix rendering in application toggling MSAA on and
off between draw calls.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7537
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19326>
Pierre-Eric Pelloux-Prayer [Wed, 26 Oct 2022 13:24:22 +0000 (15:24 +0200)]
radeonsi/gfx11: enable sdma copy DRI_PRIME
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19326>
Erik Faye-Lund [Tue, 25 Oct 2022 11:55:56 +0000 (13:55 +0200)]
docs: nfs -> NFS
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 11:45:55 +0000 (13:45 +0200)]
docs: spell ATI codenames in allcaps
This seems to be the official spelling from ATI/AMD as well.
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 11:45:02 +0000 (13:45 +0200)]
docs: nVidia -> NVIDIA
While we're at it, also spell the code-names in allcaps, like NVIDIA
does. One exception is Fermi, which is spelled like a proper noun.
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 11:42:03 +0000 (13:42 +0200)]
docs: gitlab -> GitLab
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Wed, 19 Oct 2022 09:05:02 +0000 (11:05 +0200)]
docs: Android.mk -> ndk-build
Android.mk is the name of the build-files, but ndk-build is the tool that
builds it.
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 18 Oct 2022 15:33:43 +0000 (17:33 +0200)]
docs: link to replacement forum
This news forum no longer exists, and have been migrated to the Khronos
Community. Link there instead.
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 18 Oct 2022 15:32:32 +0000 (17:32 +0200)]
docs: add links to usenet groups
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Wed, 19 Oct 2022 10:08:20 +0000 (12:08 +0200)]
docs: add missing link to mesa3d.org
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Wed, 19 Oct 2022 08:28:29 +0000 (10:28 +0200)]
docs: clean up labels
This updates the documentation of the labels to match with our actual
labels.
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 10:14:45 +0000 (12:14 +0200)]
docs: name correct driver
The two different swrast drivers we have at the moment are called
LLVMpipe and Softpipe. Let's name the latter instead of the generic
SWRast term that we use to cover *either* of the two.
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Mon, 24 Oct 2022 13:42:20 +0000 (15:42 +0200)]
docs: do not mention classic swrast
It's been removed a while back, no need to talk about it anymore.
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 09:37:11 +0000 (11:37 +0200)]
docs: remove non-existent directory
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 09:42:42 +0000 (11:42 +0200)]
docs: Adreno aXXX -> Adreno XXX
The names of these are "Adreno XXX" or "aXXX", not "Adreno aXXX".
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 10:08:35 +0000 (12:08 +0200)]
docs: xml -> XML
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 09:55:51 +0000 (11:55 +0200)]
docs: yml -> YAML
The name of the file-format is YAML, yml is the extension.
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Mon, 24 Oct 2022 15:26:53 +0000 (17:26 +0200)]
docs: swr -> OpenSWR
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Mon, 24 Oct 2022 13:06:01 +0000 (15:06 +0200)]
docs: ini -> INI
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 11:15:14 +0000 (13:15 +0200)]
docs: piglit -> Piglit
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 10:34:06 +0000 (12:34 +0200)]
docs: panfrost -> Panfrost
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 10:27:47 +0000 (12:27 +0200)]
docs: softpipe -> Softpipe
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Thu, 20 Oct 2022 09:45:29 +0000 (11:45 +0200)]
docs: llvmpipe -> LLVMpipe
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Thu, 20 Oct 2022 09:28:39 +0000 (11:28 +0200)]
docs: freedreno -> Freedreno
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 11:12:08 +0000 (13:12 +0200)]
docs: de-nominate -> denominate
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Tue, 25 Oct 2022 10:12:23 +0000 (12:12 +0200)]
docs: de-duplicated -> deduplicated
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Mon, 24 Oct 2022 13:11:47 +0000 (15:11 +0200)]
docs: spell out "transform and lighting"
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Erik Faye-Lund [Thu, 20 Oct 2022 09:30:43 +0000 (11:30 +0200)]
docs: spell out "distribution"
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19297>
Marcin Ślusarz [Fri, 28 Oct 2022 15:03:30 +0000 (17:03 +0200)]
anv: program 3DSTATE_MESH_DISTRIB with the recommended values
It improves performance of vk_meshlet_cadscene on A770.
Fixes:
f083df87108 ("anv: update task/mesh distribution with the recommended values")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19412>
Marcin Ślusarz [Thu, 27 Oct 2022 07:50:51 +0000 (09:50 +0200)]
anv: set 3DSTATE_[MESH|TASK]_CONTROL.MaximumNumberofThreadGroups
Documentation is worded in a confusing way, which may be understood that
we don't have to set this field to get good results.
MESH part of this commit improves performance of vk_meshlet_cadscene
by a factor of 2 on A380.
Fixes:
ef04caea9b8 ("anv: Implement Mesh Shading pipeline")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19412>
Marcin Ślusarz [Thu, 27 Oct 2022 08:05:17 +0000 (10:05 +0200)]
intel/genxml: fix width of 3DSTATE_TASK_CONTROL.MaximumNumberofThreadGroups
Fixes:
3567d47f3e7 ("intel/genxml: Inline the BODY structs into the instructions")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19412>
Illia Abernikhin [Tue, 13 Sep 2022 09:49:56 +0000 (12:49 +0300)]
utils: Merge util/debug.* into util/u_debug.* and remove util/debug.*
Rename env_var_as_unsigned() -> debug_get_num_option(), because duplicate
Rename env_var_as_bool() -> debug_get_bool_option(), because duplicate
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7177
Signed-off-by: Illia Abernikhin <illia.abernikhin@globallogic.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19336>
Illia Abernikhin [Mon, 31 Oct 2022 21:59:26 +0000 (05:59 +0800)]
utils: Move functions from debug.* to u_debug.*
Add unit tests for debug_get_bool_option and debug_get_num_option
Merge env_var_as_boolean and debug_get_bool_option and implement
env_var_as_boolean with debug_get_bool_option in a stricter side.
Merge env_var_as_unsigned and debug_get_num_option and implement
env_var_as_unsigned with debug_get_num_option in a stricter side.
Move debug_control, parse_debug_string, parse_enable_string,
comma_separated_list_contains from debug.* to u_debug.*
Main changes:
os_get_option() is used instead of getenv() for env_var_as_boolean
and env_var_as_unsigned;
also debug_get_bool_option() has logic like "true" always if not "false";
env_var_as_boolean() now uses different logic:
if env variable is neither "true" nor "false" returns the default value,
we left the second one; but if you want the behavior to be the same as in
the old version of debug_get_bool_option() use dfault=true
Signed-off-by: Illia Abernikhin <illia.abernikhin@globallogic.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19336>
Thomas Debesse [Wed, 5 Oct 2022 08:33:34 +0000 (10:33 +0200)]
crocus: set clear_buffer = u_default_clear_buffer
This is required when crocus is enabled in rusticl,
the lack of it contributes to this error:
thread '<unnamed>' panicked at 'Context missing features. This should never happen!', ../src/gallium/frontends/rusticl/mesa/pipe/context.rs:44:13
Signed-off-by: Thomas Debesse <dev@illwieckz.net>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19001>
Thomas Debesse [Tue, 25 Oct 2022 05:18:16 +0000 (07:18 +0200)]
gallium/clover: pass -opaque-pointers to Clang on LLVM 15 and 16
This does the exact opposite of
06e96074 from !16129.
Before LLVM commit
702d5de4 opaque pointers were supported but not enabled
by default when building LLVM. They were made default in commit
702d5de4.
LLVM commit
d69e9f9d introduced -opaque-pointers/-no-opaque-pointers cc1
options to enable or disable them whatever the LLVM default is.
Those two commits follow llvmorg-15-init and precede llvmorg-15.0.0-rc1 tags.
Since LLVM commit
d785a8ea, the CLANG_ENABLE_OPAQUE_POINTERS build option of
LLVM is removed, meaning there is no way to build LLVM with opaque pointers
enabled by default.
It was said at the time it was still possible to explicitly disable opaque
pointers via cc1 -no-opaque-pointers option, but it is known a later commit
broke backward compatibility provided by -no-opaque-pointers as verified with
arbitrary commit
d7d586e5, so there is no way to use opaque pointers starting
with LLVM 16.
Those two commits follow llvmorg-16-init and precede llvmorg-16.0.0-rc1 tags.
Since Mesa commit
977dbfc9 opaque pointers are properly implemented in Clover
and used.
If we don't pass -opaque-pointers to Clang on LLVM versions supporting opaque
pointers but disabling them by default, there will be an API mismatch between
Mesa and LLVM and Clover will not work.
Signed-off-by: Thomas Debesse <dev@illwieckz.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19290>