Samuel Pitoiset
c8499885cb
radv: use radv_physical_device_cache_key::use_ngg_culling more
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40375 >
2026-03-16 07:50:00 +00:00
Samuel Pitoiset
744cedf3a1
radv: remove unused radv_device parameter to few functions
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40375 >
2026-03-16 07:50:00 +00:00
Samuel Pitoiset
8d1e148c37
radv: remove empty gather_shader_info_cs()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40375 >
2026-03-16 07:50:00 +00:00
Samuel Pitoiset
23dcabcb72
radv: tidy up radv_postprocess_nir()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40375 >
2026-03-16 07:49:59 +00:00
Natalie Vock
867d0b33b3
radv/rt: Bump ray query stack base limit for GFX12
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
GFX12 encoding added one bit to the stack offset, doubling the limit on
the stack base offset that is possible to encode. In practice, this
always allows using bvh_stack_push* instructions on GFX12 since LDS is
still 64kB.
Cc: mesa-stable
Fixes: 59a39779 (radv/rt: Only use ds_bvh_stack_rtn if the stack base is possible to encode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40405 >
2026-03-14 15:27:49 +00:00
Benjamin Cheng
e76a5e69ff
radv/video_enc: Use variable slice mode when possible
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40329 >
2026-03-12 20:22:30 +00:00
Samuel Pitoiset
1ed37ae5e6
radv/meta: remove redundant cache flushes when copying VRS rates to HTILE
...
No need to invalidate the VCACHE again (applications are supposed to
emit a barrier) and INV_SCACHE/INV_L2 are not necessary either.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40342 >
2026-03-12 18:38:21 +00:00
Samuel Pitoiset
2afbf363ca
radv: handle FRAGMENT_SHADING_RATE_ATTACHMENT_READ properly on GFX10.3
...
When VRS rates are copied from the VRS image to HTILE. Only the
vector cache needs to be flushed becaue it's using VMEM.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40342 >
2026-03-12 18:38:21 +00:00
Samuel Pitoiset
f65290f6f9
radv: advertise VK_KHR_copy_memory_indirect on GFX8+
...
GFX6-7 don't support indirect unaligned dispatches.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37634 >
2026-03-12 12:33:04 +00:00
Samuel Pitoiset
99b3f4c7ab
radv: implement VK_KHR_copy_memory_indirect
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37634 >
2026-03-12 12:33:02 +00:00
Samuel Pitoiset
6b4a04505f
radv/meta: make some functions non-static
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37634 >
2026-03-12 12:33:02 +00:00
Marek Olšák
796e1749c6
ac: replace some packet field definitions in sid.h by generated ones
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40183 >
2026-03-11 18:54:20 +00:00
Georg Lehmann
07d5c2cbaa
radv: set no_signed_zero for FS store_output when format doesn't care
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Or when blending is enabled, because blending doesn't require IEEE math.
Foz-DB Navi21:
Totals from 367 (0.32% of 114627) affected shaders:
MaxWaves: 7884 -> 7876 (-0.10%); split: +0.20%, -0.30%
Instrs: 354948 -> 354386 (-0.16%); split: -0.16%, +0.00%
CodeSize: 1905980 -> 1903172 (-0.15%); split: -0.15%, +0.00%
VGPRs: 20208 -> 20216 (+0.04%); split: -0.08%, +0.12%
Latency: 1855670 -> 1854973 (-0.04%); split: -0.06%, +0.02%
InvThroughput: 540792 -> 539688 (-0.20%); split: -0.20%, +0.00%
PreSGPRs: 18426 -> 18366 (-0.33%)
PreVGPRs: 17213 -> 17249 (+0.21%); split: -0.05%, +0.26%
VALU: 258793 -> 258237 (-0.21%); split: -0.22%, +0.00%
SALU: 35168 -> 35166 (-0.01%); split: -0.01%, +0.01%
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40323 >
2026-03-11 16:47:15 +00:00
Samuel Pitoiset
dfdaf6a277
radv: rewrite a comment explaining why PFP waits for ME with streamout
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40327 >
2026-03-11 07:34:45 +00:00
Samuel Pitoiset
d9420eed9e
radv: fix missing L2 cache invalidation with streamout on GFX12
...
COPY_DATA emitted from the CP isn't coherent with L2, in case the
buffer filled size needs to be copied.
This fixes rare and random flickering with Mafia 3 Definitive Edition
on RDNA4.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14697
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40327 >
2026-03-11 07:34:45 +00:00
Samuel Pitoiset
6c1d9612ef
radv: only emit FORCE_S_VALID(1) for MSAA depth/stencil images
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This affects GFX12 only.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40303 >
2026-03-10 17:38:55 +00:00
Samuel Pitoiset
7cd3d40f86
radv: set {color,ds}_samples for inherited rendering state
...
There is no distinction for secondaries.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40303 >
2026-03-10 17:38:55 +00:00
Samuel Pitoiset
0da3714bd3
ac,radv,radeonsi: add has_db_force_stencil_valid_bug
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40303 >
2026-03-10 17:38:54 +00:00
Samuel Pitoiset
cb5f2a0521
radv: initialize HiZ for UNDEFINED transitions on transfer queue
...
This doesn't consider layers/mips because it doesn't seem possible,
but it doesn't hurt correctness either, it just means HiZ is disabled.
This fixes dEQP-VK.api.copy_and_blit.core.use_after_copy.*_tq on GFX12.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40304 >
2026-03-10 16:51:57 +00:00
Samuel Pitoiset
e293993fff
radv: optimize clipping performance with PA_SU_HARDWARE_SCREEN_OFFSET
...
This optimization was missing in RADV for a very long time.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6492
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40249 >
2026-03-10 12:07:46 +00:00
Samuel Pitoiset
c7cfa5324d
radv: use common guardband computations
...
That shouldn't change anything.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40249 >
2026-03-10 12:07:46 +00:00
Benjamin Cheng
8f1ace0571
radv: Disable video features for some DRM modifiers
...
Filter out video decode/encode format features when the DRM modifier
doesn't support video operations. Along with a CTS fix, this will fix
dEQP-VK.video.formats.* on UVD/VCN1 (which do not support swizzled
input).
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40203 >
2026-03-09 23:27:46 +00:00
Samuel Pitoiset
8f10e2886c
radv: dump the PS epilog in the GPU hang report
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40219 >
2026-03-09 09:53:27 +00:00
Samuel Pitoiset
4c7958ae6c
radv: apply the 1D workgroup optimization for mesh/task shaders too
...
Suggested-by: Georg Lehmann <dadschoorse@gmail.com>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40194 >
2026-03-09 09:29:35 +00:00
Samuel Pitoiset
3c4cb16159
radv: fix local invocation index for mesh/task and quad derivatives on GFX12
...
It must be lowered.
This fixes
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.{mesh,task}.*.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40194 >
2026-03-09 09:29:34 +00:00
Samuel Pitoiset
4428541c54
radv/meta: fix HTILE fixup after copying depth/stencil image copies
...
Typo, it should be false because it's after the copy.
Fixes: 4f41818194 ("radv/meta: add a function to fixup HTILE metadata for copies on compute queue")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40270 >
2026-03-09 09:07:09 +00:00
Samuel Pitoiset
fff16a9748
radv: replace radv_sdma_surf by ac_sdma_surf
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40186 >
2026-03-09 08:40:47 +00:00
Samuel Pitoiset
c40225e490
radv: tidy up radv_sdma_surf
...
Adjust few things before replacing it by ac_sdma_surf.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40186 >
2026-03-09 08:40:47 +00:00
Samuel Pitoiset
0616fd22a5
radv: simplify getting bpe for SDMA surfaces
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40186 >
2026-03-09 08:40:46 +00:00
Samuel Pitoiset
9893ac3674
radv: remove unnecessary radv_sdma_surf::{blk_w,blk_h}
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40186 >
2026-03-09 08:40:46 +00:00
Samuel Pitoiset
94acb7edd5
radv: simplify computing offset/extent of SDMA surfaces
...
By computing in elements earlier.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40186 >
2026-03-09 08:40:45 +00:00
Samuel Pitoiset
5923a7b8c6
radv: use vk_image_buffer_copy_layout() for SDMA buf layout
...
For consistency with non-SDMA paths.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40186 >
2026-03-09 08:40:45 +00:00
Samuel Pitoiset
02d047099e
radv: simplify 96-bit copies with SDMA
...
By adjusting offset/extent earlier.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40186 >
2026-03-09 08:40:45 +00:00
Samuel Pitoiset
6f3b9a62b3
radv: remove redundant radv_sdma_surf::is_linear
...
is_linear is never used for buffers.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40186 >
2026-03-09 08:40:44 +00:00
Samuel Pitoiset
dba9809e0c
radv: remove redundant radv_sdma_surf::is_3d
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40186 >
2026-03-09 08:40:44 +00:00
Samuel Pitoiset
1a00587c44
radv: fix a GPU hang with PS epilogs and secondary command buffers
...
If the secondary changes the fragment output state and if the same
PS epilog used before ExecuteCommands() is re-bind immediately after
that call, the PS epilog state wouldn't be re-emitted.
Apply the same change for VS prologs, although the logic is slightly
different and the bug shouldn't occur. The whole logic of secondaries
should be completely rewritten because it's definitely not robust.
This fixes a GPU hang in Where Winds Meet, see
https://github.com/doitsujin/dxvk/issues/5436 .
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40221 >
2026-03-09 08:16:49 +00:00
Samuel Pitoiset
ac3fd06987
radv: always enable DISABLE_CONSERVATIVE_ZPASS_COUNTS on GFX11
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This might cause incorrect occlusion queries count.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40235 >
2026-03-09 07:26:25 +00:00
Georg Lehmann
406935c6fe
radv: use nir_opt_fp_math_ctrl
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Foz-DB Navi21:
Totals from 10833 (9.63% of 112497) affected shaders:
Instrs: 10090308 -> 10043030 (-0.47%); split: -0.48%, +0.01%
CodeSize: 53681564 -> 53556756 (-0.23%); split: -0.25%, +0.01%
VGPRs: 511568 -> 511296 (-0.05%); split: -0.08%, +0.03%
SpillSGPRs: 2442 -> 2438 (-0.16%); split: -0.20%, +0.04%
Latency: 58989785 -> 58935280 (-0.09%); split: -0.18%, +0.09%
InvThroughput: 15142587 -> 15067217 (-0.50%); split: -0.52%, +0.02%
VClause: 200588 -> 200410 (-0.09%); split: -0.20%, +0.11%
SClause: 257273 -> 257262 (-0.00%); split: -0.20%, +0.19%
Copies: 741430 -> 741397 (-0.00%); split: -0.22%, +0.22%
Branches: 211023 -> 211020 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 491752 -> 491663 (-0.02%); split: -0.02%, +0.00%
PreVGPRs: 418558 -> 418089 (-0.11%); split: -0.12%, +0.01%
VALU: 7064149 -> 7017847 (-0.66%); split: -0.66%, +0.01%
SALU: 1227287 -> 1226639 (-0.05%); split: -0.13%, +0.07%
SMEM: 449268 -> 449343 (+0.02%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40098 >
2026-03-07 08:16:29 +01:00
Samuel Pitoiset
395132432b
radv: initialize HiZ also for depth-only images
...
This is actually needed to initialize it to full expanded HiZ range.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40213 >
2026-03-05 13:58:18 +00:00
Samuel Pitoiset
eaa51f4737
radv: remove unused radv_gfx12_get_hiz_clear_value()
...
This isn't necessary because depth/stencil clears use graphics.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40213 >
2026-03-05 13:58:18 +00:00
Samuel Pitoiset
ab3ae53906
radv: add radv_image_has_hiz_metadata()
...
And rename few things.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40213 >
2026-03-05 13:58:18 +00:00
Samuel Pitoiset
6358e48820
radv: add radv_image_has_hiz()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40213 >
2026-03-05 13:58:17 +00:00
Rhys Perry
7de3552f3f
radv: don't mask PS epilog spi_shader_col_format with dual source blending
...
In case the FS only writes one output.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40005 >
2026-03-05 09:38:24 +00:00
Rhys Perry
b4dc39f632
ac/nir: fix when both dual source outputs are unwritten
...
When this is the case. we shouldn't hang or crash.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40005 >
2026-03-05 09:38:23 +00:00
Samuel Pitoiset
783c065f3b
radv: always fast-clear non-MSAA color image with comp-to-single on GFX10-10.3
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This should enable fast-clear for color images with the GENERAL layout
on GFX10-10.3. This seems important because DXVK tends to use that
layout more often now.
There are still issues with MSAA images, so it's only enabled for
single-sampled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40145 >
2026-03-05 08:34:43 +00:00
Samuel Pitoiset
9de465da81
radv: remove radv_disable_depth_storage drirc
...
This was only for TW3.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40214 >
2026-03-05 07:55:27 +00:00
Samuel Pitoiset
74defc5f24
radv: disable STORAGE for depth-only formats
...
This is actually not needed because nobody is using storage with
depth-only formats and compression doesn't work at all anyways.
PAL and native don't allow this either.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40214 >
2026-03-05 07:55:26 +00:00
Marek Olšák
f421eecebe
radv,radeonsi: PA_SC_BINNER changes for gfx12
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40022 >
2026-03-04 21:14:56 +00:00
Marek Olšák
22f3761579
radv: make radv_postprocess_binary_config more correct and more readable
...
- don't set fields that don't exist on some generations
- add gfx_level checks for MEM_ORDERED even when it's technically not needed
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40022 >
2026-03-04 21:14:56 +00:00
Marek Olšák
fd6941650c
ac: add ac_cu_info::has_fmask, adjust FMASK checks
...
Some of these should check has_fmask, others should check < GFX11.
v2: move to ac_cu_info
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40022 >
2026-03-04 21:14:56 +00:00