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
Bas Nieuwenhuizen
5a84a6b775
ac/llvm: Fix build with LLVM 23.
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Simple ac_llvm_context vs LLVMContextRef mixup.
Fixes: c431eaad63 ("ac/llvm: Use new denormal_fpenv attribute for llvm >= 23")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40419 >
2026-03-14 19:57:11 +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
Georg Lehmann
87081a73c9
ac/nir/cull: make fisfinite nan/inf preserving
...
Otherwise, it's meaningless.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40291 >
2026-03-13 07:13:09 +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
David Rosca
d9ba641e28
ac: Add variable slice mode interface
...
Co-authored-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40329 >
2026-03-12 20:22:30 +00:00
Benjamin Cheng
efcc8b6d89
ac: Fix naming of hevc encode params IB
...
Make it consistent with the other codec specific IBs.
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
Marek Olšák
1c75cd958f
ac: enable the new auto-generated CP packet parser
...
This keeps old packets that were removed from newer HW, packets that set
registers, and packets using non-trivial custom code.
It preserves address checking that was done in print_addr.
Packet names still used the old generator.
Acked-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
Marek Olšák
c2d01d6fd5
amd: generate a packet parser/printer automatically from packet definitions
...
The next commit will enable this.
Acked-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
Marek Olšák
aeab5057a8
amd/packets: remove non-existent CLEAR_STATE from gfx12 definitions
...
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
Georg Lehmann
d7348ea501
aco/ra: don't tie definition when the operand is in a preserved reg
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40225 >
2026-03-10 14:21:56 +00:00
Georg Lehmann
444eb3dce5
aco/ra: try to allocate registers for dot2 to allow VOPD
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40225 >
2026-03-10 14:21:56 +00:00
Georg Lehmann
788aafba2a
aco/sched_vopd: create dot2acc from VOP3P dot2
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40225 >
2026-03-10 14:21:56 +00:00
Georg Lehmann
47599b2c38
aco/opt_postRA: remove try_convert_fma_to_vop2
...
This is now done directly in the VOPD scheduler.
Foz-DB GFX1201:
Totals from 600 (0.52% of 114655) affected shaders:
no stats changed
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40225 >
2026-03-10 14:21:56 +00:00
Georg Lehmann
6cef434478
aco/sched_vopd: convert fma with inline constants to fmamk/fmaak
...
This optimization was previously done in the post-RA optimizer,
but it is more fitting for the vopd scheduler.
Doing it here also has the benefit that we don't unnecessarily use
the constant bus when VOPD can't be used.
No Foz-DB changes on GFX12 until the next commit.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40225 >
2026-03-10 14:21:56 +00:00
Georg Lehmann
1ae9931145
aco/scheld_vopd: make VOPDInfo more flexible by adding a swizzle
...
No Foz-DB changes on GFX1201.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40225 >
2026-03-10 14:21:55 +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
Samuel Pitoiset
bcccd49368
ac,radeonsi: move guardband computations to common code
...
Added a comment from Marek Olsak explaining this.
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
2ca7d93519
ac,radeonsi: pre-compute some raster config in ac_gpu_info
...
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
3e8e31add7
amd/drm-shim: bump version_minor to 52
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is required to make sure that conformant_trunc_coord is correctly
enabled/disabled. Otherwise, it might be disabled on GFX11 GPUs with
drm-shim.
Bumping the minor version shouldn't have any other effects.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40313 >
2026-03-10 11:19:33 +00:00
Samuel Pitoiset
db905159fd
amd/drm-shim: add phoenix
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40313 >
2026-03-10 11:19:33 +00:00