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
Samuel Pitoiset
37ba573877
radv/meta: set the depth/stencil resolve region depth to 1
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
No 3D.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40135 >
2026-03-04 15:12:54 +00:00
Samuel Pitoiset
4d3549d372
radv/meta: rework the barrier for depth/stencil resolves
...
Yes, COLOR_ATTACHMENT_WRITE_BIT can be used to synchronize ds resolves.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40135 >
2026-03-04 15:12:54 +00:00
Samuel Pitoiset
e7d135ae51
radv/meta: optimize synchronization with compute resolves
...
It's only required to synchronize at the end, so that all compute
resolves can run in parallel.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40135 >
2026-03-04 15:12:53 +00:00
Samuel Pitoiset
fc0c3f6d84
radv/meta: remove an useless barrier before color resolves with graphics
...
No reason to require a barrier either because there is already one
before doing resolves and decompressions should already be correctly
synchronized.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40135 >
2026-03-04 15:12:53 +00:00
Samuel Pitoiset
c9c16d62dd
radv/meta: remove an useless barrier after color resolves with graphics
...
The app must synchronize with
VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT anyways.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40135 >
2026-03-04 15:12:52 +00:00
Samuel Pitoiset
421b15cd3a
radv/meta: remove redundant barriers in vkCmdResolveImage2()
...
The source image layout must be either TRANSFER_SRC or GENERAL and the
application must emit the image layout transition. There is no reason
the source image wouldn't be readable by shaders.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40135 >
2026-03-04 15:12:52 +00:00
Rhys Perry
5c3b5688a1
amd: rename ac_cu_info to ac_compiler_info
...
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/40042 >
2026-03-03 08:50:12 +00:00
Rhys Perry
a65089dfce
ac/nir: pass ac_cu_info to ac_nir_compute_tess_wg_info
...
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/40042 >
2026-03-03 08:50:11 +00:00
Rhys Perry
8801ca188d
ac/nir: don't pass radeon_info to ac_nir_set_options
...
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/40042 >
2026-03-03 08:50:10 +00:00
Rhys Perry
5a8a7dbb22
ac/nir: don't pass radeon_info to NGG lowering
...
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/40042 >
2026-03-03 08:50:09 +00:00
Rhys Perry
36feec61c8
ac/nir: use ac_nir_lower_ngg_options for ac_nir_lower_ngg_mesh
...
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/40042 >
2026-03-03 08:50:09 +00:00
Samuel Pitoiset
27b6ad994a
radv: fix computing pitch/slice_pitch for compressed block formats
...
Also there is no need to multiply for dividing later.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40121 >
2026-03-02 14:44:14 +00:00
Samuel Pitoiset
67c985d754
radv: mark linear images for SDMA as potentially compressed on GFX12
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40121 >
2026-03-02 14:44:14 +00:00
Samuel Pitoiset
e6e305988c
ac,radv,radeonsi: merge tiled/linear surfaces into one struct
...
This will be used to rework/fix metadata config on SDMA7.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40121 >
2026-03-02 14:44:14 +00:00
Samuel Pitoiset
1a695d50b2
radv: tidy up determining 3D alignment for SDMA
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40121 >
2026-03-02 14:44:14 +00:00
Samuel Pitoiset
afc261d43a
radv: remove redundant radv_sdma_surf::micro_tile_mode
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40121 >
2026-03-02 14:44:14 +00:00
Samuel Pitoiset
cc21e61e43
radv: fix copying images with different swizzle modes on SDMA7
...
Swizzle modes must match on SDMA7 (GFX12), and the micro tile mode
doesn't exist.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40121 >
2026-03-02 14:44:14 +00:00
Marek Olšák
f22f117d1a
amd: add meson variable idep_amd_generated_headers for all generated headers
...
group all generated header under the same variable
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40084 >
2026-02-28 05:23:59 +00:00
Mike Blumenkrantz
b8ee6f3d30
radv: fix multiview fast clears
...
this was only clearing layer0 because it was ignoring the viewmask
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40123 >
2026-02-27 15:07:01 +00:00
Samuel Pitoiset
5fa94dba34
radv: only enable DCC/HTILE if it's compressed with SDMA
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's wrong to enable compression if it's not compressed.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40101 >
2026-02-27 11:23:48 +00:00
Samuel Pitoiset
d583339e79
radv/meta: add a single function for color/depth&stencil fragment resolves
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:39 +00:00
Samuel Pitoiset
8d0206c95f
radv/meta: simplify creating pipelines for color/depth&stencil fragment resolves
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:39 +00:00
Samuel Pitoiset
009cf9bfa7
radv/meta: pass a resolve mode for fragment color resolves
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:38 +00:00
Samuel Pitoiset
2c5685ed89
radv/meta: inline one function in the fragment resolve path
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:38 +00:00
Samuel Pitoiset
876b204703
radv/meta: use the same shader for color/depth&stencil fragment resolves
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:37 +00:00
Samuel Pitoiset
fd9cbff41a
radv/meta: move the barrier for color fragment resolves outside
...
This barrier is only needed for rendering resolves (ie. not for
vkCmdResolveImage()). Though, these barriers are likely unnecessary
but let's keep them for now.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:37 +00:00
Samuel Pitoiset
255439fd9c
radv/meta: fix the shader stage for push constants in the fragment resolve path
...
RADV doesn't use it but better to set it correctly.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:37 +00:00
Samuel Pitoiset
ed546ce809
radv/meta: add a single function for color/depth&stencil compute resolves
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:36 +00:00
Samuel Pitoiset
94234f35fd
radv/meta: simplify creating pipelines for color/depth&stencil compute resolves
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:36 +00:00
Samuel Pitoiset
1c7b416daa
radv/meta: pass a resolve mode for compute color resolves
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:36 +00:00
Samuel Pitoiset
2ae32d709c
radv/meta: inline one function in the compute resolve path
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:35 +00:00
Samuel Pitoiset
e3e52c348c
radv/meta: use the same shader for color/depth&stencil compute resolves
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:35 +00:00
Samuel Pitoiset
08f147d92c
radv/meta: add depth/stencil support to the core resolve shader
...
This removes lot of duplicated code.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:34 +00:00
Samuel Pitoiset
1e561eb1d7
radv/meta: replace radv_meta_resolve_type by VkImageAspectFlags
...
It's either depth or stencil.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40064 >
2026-02-27 08:21:34 +00:00