Commit graph

221198 commits

Author SHA1 Message Date
Jose Maria Casanova Crespo
31c8e14df3 broadcom/compiler: MULTOP in branch delay slots doesn't generate RTOP hazard
On unconditional branches qpu_set_branch_targets() can fill the delay slots
with a copy of the first instructions of the successor block.

As the qpu validator is sequential it would detect an incorrect hazard
when the MULTOP was copied but the UMUL24 wasn't.

This was identified in debug build when running gfxbench5.aztec_ruins_vk.

Assisted-by: Claude Opus 4.6
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40923>
2026-04-14 16:34:54 +00:00
Jose Maria Casanova Crespo
dd6e7c8ef0 broadcom/compiler: really enable branch in delay slots validation
The validation of branch instructions happening in branch and thrsw
delay slots has been dead code since it was introduced as the check
was after:

  if (inst->type != V3D_QPU_INSTR_TYPE_ALU)
          return;

Now last_branch_ip is updated and checks in_branch_delay_slots()
are active.

Fixes in_branch_delay_slots, as for branch there are always 3 delay slots.

As scheduler enforces this restrictions shader-db does not show any
regression.

Assisted-by: Claude Opus 4.6
Fixes: 90269ba353 ("broadcom/vc5: Use THRSW to enable multi-threaded shaders.")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40923>
2026-04-14 16:34:54 +00:00
Michael Cheng
8ea53c25d4 anv: log aux disable reasons in image init and DRM modifier selection
Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40658>
2026-04-14 16:14:48 +00:00
Michael Cheng
34e27bbf9f anv: log aux disable and aux-skip reasons during image setup
Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40658>
2026-04-14 16:14:48 +00:00
Michael Cheng
44d06d855c anv: log fast depth clear fallback reasons in vkCmdClearAttachments
Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40658>
2026-04-14 16:14:47 +00:00
Michael Cheng
3b7e56482d anv: log fast color clear fallback reasons in vkCmdClearAttachments
Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40658>
2026-04-14 16:14:47 +00:00
Frank Binns
63c47734a9 pvr: re-enable wideLines
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Partial revert of a22ad99bdd ("pvr: set device features/props/extensions to
Vulkan 1.0 minimums (unless implemented)"), as this optional feature is fully
implemented already.

Tested with:
dEQP-VK.*wide*
dEQP-VK.dynamic_state.monolithic.line_width.*

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40890>
2026-04-14 15:30:57 +01:00
Frank Binns
ffce80d242 pvr: re-enable depthBiasClamp
Partial revert of a22ad99bdd ("pvr: set device features/props/extensions to
Vulkan 1.0 minimums (unless implemented)"), as this optional feature is fully
implemented already.

Tested with:
dEQP-VK.*depth_bias*
dEQP-VK.*bias_clamp*

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40890>
2026-04-14 15:30:53 +01:00
Frank Binns
50b06b888f pvr: re-enable multiDrawIndirect
Partial revert of a22ad99bdd ("pvr: set device features/props/extensions to
Vulkan 1.0 minimums (unless implemented)"), as this optional feature is fully
implemented already.

Tested with:
dEQP-VK.draw.*_multi_draw

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40890>
2026-04-14 15:30:49 +01:00
Frank Binns
e946d6754e pvr: re-enable fullDrawIndexUint32
Partial revert of a22ad99bdd ("pvr: set device features/props/extensions to
Vulkan 1.0 minimums (unless implemented)"), as this optional feature is fully
implemented already.

It also turns out that Vulkan CTS was already testing this feature even though
it wasn't being advertised as supported,
dEQP-VK.draw.renderpass.indexed_draw.draw_instanced_indexed_triangle_list being
an example of this.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40890>
2026-04-14 15:30:45 +01:00
Yiwei Zhang
e99e275c56 docs/vulkan: fix the order of platform and vendor extensions
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40946>
2026-04-14 14:15:32 +00:00
Yiwei Zhang
bd8b288cd0 docs/vulkan: fix the order of KHR and EXT extensions
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40946>
2026-04-14 14:15:32 +00:00
Rhys Perry
984aa6e085 aco/ra: create s_bitset
fossil-db (navi31):
Totals from 33092 (16.35% of 202426) affected shaders:
Instrs: 16722717 -> 16696250 (-0.16%); split: -0.16%, +0.00%
CodeSize: 90003664 -> 89779940 (-0.25%); split: -0.25%, +0.00%
Latency: 123990480 -> 123934891 (-0.04%); split: -0.05%, +0.00%
InvThroughput: 20972033 -> 20971140 (-0.00%); split: -0.01%, +0.00%

fossil-db (navi21):
Totals from 6776 (3.35% of 202427) affected shaders:
Instrs: 11167123 -> 11166438 (-0.01%)
CodeSize: 62605436 -> 62573220 (-0.05%); split: -0.05%, +0.00%
Latency: 238610061 -> 238603224 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 55148639 -> 55148624 (-0.00%); split: -0.00%, +0.00%
Copies: 1211216 -> 1210612 (-0.05%); split: -0.05%, +0.00%
SALU: 1436679 -> 1435997 (-0.05%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40889>
2026-04-14 13:19:55 +00:00
Rhys Perry
88dcda1078 aco: support s_bitset
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40889>
2026-04-14 13:19:55 +00:00
Georg Lehmann
6a2ac18b2b radv: remove radv_remove_color_exports
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We do this later on lowered IO anyway, in radv_nir_trim_fs_color_exports.
That pass is also per component, and not per output slot.

No Foz-DB changes on Navi48.

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/40928>
2026-04-14 12:58:00 +00:00
Georg Lehmann
cbeccb0a09 radv: call radv_optimize_nir after lowering io
We are moving more and more passes after lowering io
because they no longer operate on variables.

There doesn't really seem to be a need to optimize before
lowering io, so do it afterwards.

Foz-DB Navi48:
Totals from 2339 (1.14% of 205045) affected shaders:
MaxWaves: 66218 -> 66258 (+0.06%)
Instrs: 2009510 -> 2007711 (-0.09%); split: -0.15%, +0.06%
CodeSize: 10646476 -> 10648376 (+0.02%); split: -0.05%, +0.07%
VGPRs: 131304 -> 131232 (-0.05%)
Latency: 19249976 -> 19248715 (-0.01%); split: -0.02%, +0.02%
InvThroughput: 3133252 -> 3132291 (-0.03%); split: -0.05%, +0.02%
VClause: 32999 -> 33003 (+0.01%); split: -0.07%, +0.08%
SClause: 42959 -> 43101 (+0.33%); split: -0.27%, +0.60%
Copies: 143721 -> 143792 (+0.05%); split: -0.38%, +0.43%
Branches: 38736 -> 38738 (+0.01%)
PreSGPRs: 106104 -> 105846 (-0.24%); split: -0.27%, +0.03%
PreVGPRs: 95217 -> 95179 (-0.04%); split: -0.04%, +0.00%
VALU: 1146620 -> 1144783 (-0.16%); split: -0.22%, +0.06%
SALU: 275263 -> 275183 (-0.03%); split: -0.16%, +0.13%
VMEM: 58353 -> 58364 (+0.02%)
SMEM: 84810 -> 85215 (+0.48%); split: -0.00%, +0.48%

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/40928>
2026-04-14 12:58:00 +00:00
Georg Lehmann
4598bbaea7 radv: immediately remove phis after loop unrolling
Loop unrolling can create phis when constants are defined in the loop but
used outside of it. Ideally this should not happen, but for now we have
to remove these as soon as possible before they trip up other passes.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40928>
2026-04-14 12:58:00 +00:00
Pierre-Eric Pelloux-Prayer
7e163fb793 ac/tests: use amdgpu shim devices
Instead of duplicating fake devices.
This requires to move amdgpu_devices.* to the common folder so
they can be shared between shim and tests.

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/40656>
2026-04-14 12:06:20 +00:00
Pierre-Eric Pelloux-Prayer
7340442840 ac/info: constify ac_fill_compiler_info
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/40656>
2026-04-14 12:06:20 +00:00
Pierre-Eric Pelloux-Prayer
8c6a18364a ac/info: add ac_fill_tess_info
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/40656>
2026-04-14 12:06:19 +00:00
Pierre-Eric Pelloux-Prayer
2f8865035f ac/info: add ac_fill_hw_info
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/40656>
2026-04-14 12:06:18 +00:00
Pierre-Eric Pelloux-Prayer
8b28cdc8bd ac/info: add ac_fill_feature_info
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/40656>
2026-04-14 12:06:18 +00:00
Pierre-Eric Pelloux-Prayer
84dcc8b940 ac/info: add ac_fill_bug_info
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/40656>
2026-04-14 12:06:17 +00:00
Pierre-Eric Pelloux-Prayer
a26ba344a3 ac/info: remove has_bo_metadata
It's unused.

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/40656>
2026-04-14 12:06:16 +00:00
Pierre-Eric Pelloux-Prayer
44334d6de0 ac/info: move more memory properties to ac_fill_memory_info
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/40656>
2026-04-14 12:06:15 +00:00
Pierre-Eric Pelloux-Prayer
5abf02362f ac/info: add ac_identify_chip
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/40656>
2026-04-14 12:06:14 +00:00
Pierre-Eric Pelloux-Prayer
360e9503d8 ac/info: add ac_fill_hw_ip_info
num_instances is initialized to 1 and overriden in ac_query_gpu_info.

has_graphics needs to be set early as other info fields are determined
based on its value.

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/40656>
2026-04-14 12:06:14 +00:00
Pierre-Eric Pelloux-Prayer
2bc0e5437d ac/info: add ac_fill_memory_info
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/40656>
2026-04-14 12:06:13 +00:00
Pierre-Eric Pelloux-Prayer
f9c60f3699 ac/info: add ac_fill_tiling_info
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/40656>
2026-04-14 12:06:12 +00:00
Pierre-Eric Pelloux-Prayer
79ebbf587e ac: remove ac_null_device
Prefer AMDGPU shim.

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/40656>
2026-04-14 12:06:12 +00:00
Pierre-Eric Pelloux-Prayer
42d4ec080c winsys/amdgpu: remove assert
This was useful to validate native context fence code, but
now it has less value and triggers when drm-shim is used.

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/40656>
2026-04-14 12:06:10 +00:00
Pierre-Eric Pelloux-Prayer
d97688b6b3 drm-shim: fix shim on GLX
xcb_dri3_open_reply_fds will dup the fd received from the server,
so we need to detect this case.

Reviewed-by: Emma Anholt <emma@anholt.net>
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/40656>
2026-04-14 12:06:10 +00:00
Aitor Camacho
2ec0925bc1 kk: Fix pre-gfx encoder dependency with gfx encoder
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40914>
2026-04-14 10:48:29 +00:00
Samuel Pitoiset
d39d846cfa radv/ci: set RADV_EXPERIMENTAL=heap
Current VKCTS main doesn't have any tests for that, but next uprev
should contain a bunch and using that envvar will allow us to catch
them easily.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:29 +00:00
Samuel Pitoiset
f4f2a966e3 radv: advertise VK_EXT_descriptor_heap with RADV_EXPERIMENTAL=heap
It's not yet enabled by default because it's quite a big extension
and I expect bugs because test coverage isn't very good. It will be
enabled by default in one or two Mesa releases when it's more stable.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:29 +00:00
Samuel Pitoiset
67ae52cdc2 radv: add support for DGC with descriptor heap
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:28 +00:00
Samuel Pitoiset
17ed105a9b radv: flush caches with descriptor heap access flags
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:28 +00:00
Samuel Pitoiset
ef03ca8dab radv: add support for inherited descriptor heap for secondaries
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:28 +00:00
Samuel Pitoiset
5df943629d radv: add support for capture&replay with descriptor heap
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:28 +00:00
Samuel Pitoiset
7ebf99362d radv: implement vkGetPhysicalDeviceDescriptorSizeEXT()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:28 +00:00
Samuel Pitoiset
d557f21bb6 radv: implement vkCmdPushDataEXT()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:28 +00:00
Samuel Pitoiset
5704ad905d radv: add support for emitting descriptor heaps
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:27 +00:00
Samuel Pitoiset
86e8d171fc radv: implement vkCmdBind{Resource,Sampler}HeapEXT()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:26 +00:00
Samuel Pitoiset
7e63a2050b radv: implement vkWrite{Resource,Sampler}DescriptorsEXT()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:26 +00:00
Samuel Pitoiset
7da95418a5 radv: copy mapping info for graphics pipeline libraries
In case only SPIR-V only is imported.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:26 +00:00
Samuel Pitoiset
aeda29c8f7 radv: allow to create pipelines with a NULL pipeline layout
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:26 +00:00
Samuel Pitoiset
65415b1c89 radv: set descriptor heap sizes/alignments for VTN
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:25 +00:00
Samuel Pitoiset
652af97f8b radv/nir: lower descriptor heap in radv_nir_lower_descriptors
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:25 +00:00
Samuel Pitoiset
8588ddf0df radv/nir: rename radv_nir_apply_pipeline_layout
to radv_nir_lower_descriptors. This is more generic and descriptor
heap support will be added to the same pass.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:25 +00:00
Samuel Pitoiset
0f2f9a9045 radv/nir: adjust lowering of immediate samplers for descriptor heap
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:25 +00:00