Samuel Pitoiset
ad948a8ca6
radv/meta: fix missing sync for compute resolves
...
Removed this by mistake during a rebase presumably.
This fixes a regression with
dEQP-VK.pipeline.monolithic.multisample.m10_resolve.* on <= GFX8.
Fixes: 1746837a71 ("radv/meta: remove CB_RESOLVE")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40449 >
2026-03-17 11:36:53 +00:00
Rhys Perry
200555fd3b
radv: improve lower_array_layer_round_even condition
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If conformant_trunc_coord=true, then the hardware never truncates the
layer and this lowering isn't needed.
If conformant_trunc_coord=false, then this lowering is needed if
TRUNC_COORD might be set, which is never the case if
disable_trunc_coord=true.
The previous version of this code always did the lowering if
disable_trunc_coord=true, which shouldn't be necessary.
fossil-db (navi31):
Totals from 2244 (2.00% of 112041) affected shaders:
MaxWaves: 50550 -> 50552 (+0.00%)
Instrs: 4497677 -> 4495106 (-0.06%); split: -0.07%, +0.01%
CodeSize: 23967696 -> 23958808 (-0.04%); split: -0.05%, +0.01%
VGPRs: 165132 -> 165096 (-0.02%)
Latency: 45174171 -> 45165056 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 7645548 -> 7639935 (-0.07%); split: -0.08%, +0.00%
VClause: 66733 -> 66717 (-0.02%); split: -0.08%, +0.05%
SClause: 83906 -> 83936 (+0.04%); split: -0.08%, +0.12%
Copies: 297125 -> 297292 (+0.06%); split: -0.19%, +0.24%
Branches: 69963 -> 69960 (-0.00%)
PreSGPRs: 142985 -> 143002 (+0.01%)
PreVGPRs: 138017 -> 137966 (-0.04%)
VALU: 3022018 -> 3019855 (-0.07%); split: -0.07%, +0.00%
SALU: 389844 -> 389663 (-0.05%); split: -0.12%, +0.07%
VOPD: 809 -> 810 (+0.12%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40409 >
2026-03-17 10:27:07 +00:00
Zeyang Lyu
70a487adfb
radv: Fix incorrect misaligned_mask_invalid for VK_EXT_vertex_input_dynamic_state
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The cmd_buffer->vertex_bindings was not cleared when resetting the command buffer.
The previous misaligned_mask_invalid bits were not preserved when calling radv_CmdBindVertexBuffers2 multiple times.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40312 >
2026-03-17 06:56:48 +00:00
Natalie Vock
b046eaf36d
radv/rt: Fix shared ray query stack on top of application LDS
...
Since the stack pointer may wrap around the stack size in overflow
cases, traversal logic calculates the real stack pointer with
nir_umod_imm(b, stack, args->stack_entries * args->stack_stride).
For ray queries, "stack" was initialized to
"stack_base + local_invocation_idx * 4". This was completely broken, as
the umod would later delete the stack base completely and overwrite the
start of LDS, which belongs to the apps' shared memory.
Instead, add the stack base as a constant offset in the load/store_stack
callback. (This should also save 1 VALU per ray query)
Also, delete radv_ray_traversal_args::stack_base since it's unused now.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40420 >
2026-03-16 12:43:59 +00:00
Samuel Pitoiset
e1aa011ce4
radv: stop passing radv_device for SPIR-V debug reports
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40379 >
2026-03-16 11:55:45 +00:00
Samuel Pitoiset
639207701d
aco,radv,radeonsi: remove debug report support in ACO
...
This doesn't seem very useful since ACO will abort and print the
error messages to stderr.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40379 >
2026-03-16 11:55:45 +00:00
Samuel Pitoiset
d6fe5ee8a6
vulkan: do not pass vk_instance for debug report messages
...
RADV wants to abstract the compiler from any instance/device/pdev
objects.
The previous NULL check for instance seems to be useless.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40379 >
2026-03-16 11:55:45 +00:00
David Rosca
25095cc393
radv/video: Fix coding pic_parameter_set_id in H264 slice header
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40374 >
2026-03-16 10:39:13 +00:00
David Rosca
0450e4ff65
radv/video: Fix AV1 encode min tile size
...
Fixes: 37e71a5cb2 ("radv/video: add support for AV1 encoding")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40374 >
2026-03-16 10:39:13 +00:00
Samuel Pitoiset
fd032536d9
radv: cleanup valid image layouts in radv_layout_is_htile_compressed()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40154 >
2026-03-16 09:16:09 +00:00
Samuel Pitoiset
205fe011ea
radv: always use separate depth/stencil layouts for rendering
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40154 >
2026-03-16 09:16:09 +00:00
Samuel Pitoiset
7343aff8aa
radv: fix missing HTILE decompression with separate depth/stencil layouts
...
These two layouts mean either the depth or the stencil aspect is
compressed. Without TC-compat HTILE (mostly < GFX8), the driver must
expand HTILE.
This prevents regressions with Vulkan runtime code using separate
depth/stencil layouts by default.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40154 >
2026-03-16 09:16:09 +00:00
Samuel Pitoiset
5192ee3c88
radv: handle separate depth/stencil layouts correctly for barriers
...
Need to split the transitions, one for each aspect.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40154 >
2026-03-16 09:16:08 +00:00
Samuel Pitoiset
3c26a2fdb1
radv: handle separate depth/stencil layouts correctly for fbfetch decompressions
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40154 >
2026-03-16 09:16:08 +00:00
Samuel Pitoiset
cb3cbf4303
radv/meta: stop setting the other depth/stencil attachments when unused
...
It should be either both or depth-only or stencil-only.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40154 >
2026-03-16 09:16:07 +00:00
Samuel Pitoiset
feffa62a41
radv/meta: add separate ds layouts support to the HTILE expand pass
...
This should work just fine.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40154 >
2026-03-16 09:16:07 +00:00
Samuel Pitoiset
58441d014e
radv: stop checking whether HTILE is compressed with the UNDEFINED layout
...
This doesn't make sense.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40154 >
2026-03-16 09:16:07 +00:00
Samuel Pitoiset
a55b49569f
radv: only set the relevant image views for custom depth/stencil resolves
...
So the rendering state has correct information, like the aspects.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40154 >
2026-03-16 09:16:07 +00:00
Samuel Pitoiset
1746837a71
radv/meta: remove CB_RESOLVE
...
CB_RESOLVE isn't very fast and we already have two different paths,
it's been removed in hw since GFX11. PAL and RadeonSI removed support
for it too.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39957 >
2026-03-16 08:12:46 +00:00
Samuel Pitoiset
9c05ca4366
radv/meta: use the fragment resolve path by default
...
CB_RESOLVE is going to be removed. The driver will fallback to the
compute resolve path if necessary.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39957 >
2026-03-16 08:12:46 +00:00
Samuel Pitoiset
90a60c84b5
ac/rtld: remove radeon_info
...
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:02 +00:00
Samuel Pitoiset
f6b4acdf45
radv: remove radv_use_llvm_for_stage()
...
This was useful few years ago to investigate ACO vs LLVM issues but
now it seems unnecessary.
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:02 +00:00
Samuel Pitoiset
a7cc55c33b
radv: remove unnecessary 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:01 +00:00
Samuel Pitoiset
1f20feacaa
radv: remove radv_nir_compiler_options::info
...
Passing radeon_info is bad.
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:01 +00:00
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