Commit graph

220955 commits

Author SHA1 Message Date
Karmjit Mahil
0fcecb97f1 tu: Cleanup some includes
Remove unused includes or heavy includes (e.g. `tu_common.h`) when
we could have done with lighter ones.

iwyu was used to find these cases.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:55:01 +00:00
Karmjit Mahil
9429b474f6 tu: Reorder includes
These follow our clang-format style now.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:55:01 +00:00
Karmjit Mahil
ef0de29292 tu: Update .clang-format include categories
Add missing folder patterns, and make the `^<vulkan/` pattern
apply to system includes too, so that all system includes are
in one group.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:55:00 +00:00
Karmjit Mahil
3c9ce4fdbc tu: Undef before redefining MESA_LOG_TAG
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:55:00 +00:00
Karmjit Mahil
bd66b7bc01 tu: Use "nir/" for the nir includes
This is to match the pattern used in our clang-format file

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:55:00 +00:00
Karmjit Mahil
cd299b433e freedreno: Add check_xml_includes to meson setup
This avoids wasting CI time by catching the error early. We do
still need the meson test to catch these issues locally when
rebuilding from an already configured build directory though.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:54:59 +00:00
Karmjit Mahil
1208d84f3c freedreno: Add check_xml_includes test
Add a test to ensure that we're always using one of the wrapper
files instead of including the XML generated headers directly.

Assisted-by: Opencode (MiniMax M2.7)
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:54:59 +00:00
Karmjit Mahil
396201a9ab freedreno: Add fd{2,3,4,5}_hw.h and fd_hw_common.h
Add some wrapper header files so that we always include everything
that's needed by the generated header. This is in preparation for
setting up a script which enforces using these instead of importing
the xml generated headers directly.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:54:59 +00:00
Karmjit Mahil
35f6efac76 freedreno/a6xx: Add missing include to fd6_pack.h
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:54:59 +00:00
Karmjit Mahil
b6ddd10d21 freedreno/registers: Add some missing include in fd6_hw.h
The generated header can't be used stand-alone so add the includes
in fd6_hw.h

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:54:59 +00:00
Pavel Ondračka
2ac3652f30 r300: keep all vertex atributes 32bit on big endian
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The VAP has only a global swap mode, not per-attribute endian
control. Keep all TCL vertex attributes at 32-bit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40501>
2026-04-10 12:36:11 +00:00
Yiwei Zhang
2cfbc7ef9a ci/venus: update expectation for an expected fail
Failed since the below MR and was said to be a CTS bug:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40520

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40790>
2026-04-10 12:16:04 +00:00
Yiwei Zhang
b90adb10e8 venus: ensure ffb can catch device lost
similar to qfb

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15206
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40790>
2026-04-10 12:16:04 +00:00
Yiwei Zhang
35a18596ee venus: add vn_get_fence_status that takes vn_relax_state
No behavior change in this commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40790>
2026-04-10 12:16:04 +00:00
Yiwei Zhang
e3afacb7b3 venus: ensure sfb can catch device lost
Similar to qfb except that we skip sfb consistency validation here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40790>
2026-04-10 12:16:04 +00:00
Yiwei Zhang
20533207d3 venus: add vn_get_semaphore_counter_value that takes vn_relax_state
No behavior change in this commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40790>
2026-04-10 12:16:04 +00:00
Yiwei Zhang
9764c494ef venus: ensure qfb can catch device lost
qfb shortcuts the synchronous query wait, so venus might be unable to
populate the device lost error from the host Vulkan driver. This change
emits a host call upon vn_relax warn order for that purpose. If the host
call ends up successful, we double check the qfb availability for
consistency to avoid silent regressions in qfb code path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40790>
2026-04-10 12:16:03 +00:00
Yiwei Zhang
de86f0223d venus: add vn_relax_warn to check if at warn order
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40790>
2026-04-10 12:16:03 +00:00
Yiwei Zhang
b1de02b7ea venus: relocate vn_query_feedback_wait_ready into qfb query
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40790>
2026-04-10 12:16:03 +00:00
Yiwei Zhang
c8d9142b1f venus: add vn_get_query_pool_results for non-qfb
This is the legacy path. Refactor to a helper to prepare for more
robust device lost detection.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40790>
2026-04-10 12:16:03 +00:00
Rhys Perry
93340aa80d docs/aco: add live variable analysis documentation
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: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40825>
2026-04-10 10:34:45 +00:00
Rhys Perry
1619288a19 aco: ignore copykill+latekill operands in get_temp_reg_changes
This is possible with two vectors which share a temporary, though I don't
think it currently happens in practice.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40825>
2026-04-10 10:34:45 +00:00
Simon Perretta
590d1d7274 pvr: advertise VK_KHR_shader_integer_dot_product
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40607>
2026-04-10 09:38:25 +00:00
Simon Perretta
49b1500bac pco: add native u{add,sub}{carry,borrow,sat} ops
Implements ops without needing the NIR lowering.
The sum and carry parts can later be combined into single instruction.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40607>
2026-04-10 09:38:25 +00:00
Alyssa Rosenzweig
181611786c brw: round up block components
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this ensures we don't see vec5 @load_ssbo_uniform_block_intel which
requires special backend handling, instead rounding up in NIR to vec8
which the LSC can do. affects
dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec3_lowp_compute.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40877>
2026-04-10 09:16:43 +00:00
Alyssa Rosenzweig
70e246d7bc brw: chop up unaligned access
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40877>
2026-04-10 09:16:43 +00:00
Alyssa Rosenzweig
c1e1cc9b01 brw: lower mem access sizes even for UBOs
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40877>
2026-04-10 09:16:43 +00:00
Alyssa Rosenzweig
9d82888383 brw: lower 16-bit mulh
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40877>
2026-04-10 09:16:42 +00:00
Daniel Schürmann
8cb8c710fb aco: remove remaining occurences of block_kind_continue
It has no purpose anymore.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40628>
2026-04-10 08:51:39 +00:00
Daniel Schürmann
74661ccec2 aco/lower_branches: remove handling of block_kind_continue
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40628>
2026-04-10 08:51:39 +00:00
Daniel Schürmann
7f0709cff5 aco/opt_value_numbering: remove handling of block_kind_continue
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40628>
2026-04-10 08:51:39 +00:00
Daniel Schürmann
a8c4b9f100 aco/lower_phis: remove handling of block_kind_continue
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40628>
2026-04-10 08:51:39 +00:00
Daniel Schürmann
16396f2ce6 aco/insert_exec_mask: remove handling of loop continues
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40628>
2026-04-10 08:51:39 +00:00
Daniel Schürmann
495c7271a3 aco/isel: remove handling of nir_jump_continue
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40628>
2026-04-10 08:51:39 +00:00
Daniel Schürmann
5e89be331f aco/lower_branches: Fix try_rotate_latch_block()
Found by inspection.

Fixes: 97f095f6e0 ('aco/lower_branches: Add try_rotate_latch_block() optimization')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40628>
2026-04-10 08:51:39 +00:00
Daniel Schürmann
60b3e5b3f0 aco/lower_branches: Don't remove branches which jump over loops
Entering a loop with empty exec mask might lead to
not be able to execute the break condition and
lead to infinite loops.

Totals from 81 (0.04% of 202440) affected shaders: (Navi48)
Instrs: 3040566 -> 3040716 (+0.00%)
CodeSize: 17506768 -> 17507188 (+0.00%)
Latency: 16342966 -> 16345166 (+0.01%)
InvThroughput: 3112932 -> 3113286 (+0.01%)
Branches: 82229 -> 82365 (+0.17%)

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40628>
2026-04-10 08:51:39 +00:00
Julia Zhang
373498bf7e radv/amdgpu: handle DISCARDABLE flag in get_flags_from_fd
Map the kernel alloc_flag AMDGPU_GEM_CREATE_DISCARDABLE to
RADEON_FLAG_DISCARDABLE in function radv_amdgpu_bo_get_flags_from_fd.

Signed-off-by: Julia Zhang <Julia.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40879>
2026-04-10 08:24:56 +00:00
Tapani Pälli
c5bfa688b4 intel/dev: update mesa_defs.json from workaround database
This updates 14024997852 with BMG and brings in media WA
16021867713.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40881>
2026-04-10 09:50:41 +03:00
Marek Olšák
a7c63ae6fa amd: switch to new packet definitions for all packets
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The new definitions have their numbers offset by 1 (e.g. S_580 -> S_581).
The remaining old definitions are adjusted to match that.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40588>
2026-04-10 03:42:45 +00:00
Marek Olšák
30f8bbd97b amd/packets: add disable_wr_confirm alias to dis_wc
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40588>
2026-04-10 03:42:45 +00:00
Marek Olšák
e281b7b653 amd/packets: remove the underscore between opcode number and word index, use %x
we are more used to this format

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40588>
2026-04-10 03:42:45 +00:00
Marek Olšák
2aa9ec5018 amd/packets: fix the size of 1-bit bitfields
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15137

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40588>
2026-04-10 03:42:44 +00:00
Alexander Koskovich
f560760b27 freedreno/common: add support for the Adreno 810
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add support for the Adreno 810 found on the SM7635 (milos).

Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40613>
2026-04-10 01:24:59 +00:00
Faith Ekstrand
432a298f67 pan/bi: Vectorize more conversions
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40769>
2026-04-09 18:08:40 -04:00
Faith Ekstrand
37dcfcc6d0 pan/bi: Handle vector 16-bit extract_[ui]8
The old implementation only worked for 16-bit because we assumed scalar
so we could stomp the whole destination as if it was 32-bit.  This
version works for v2i16.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40769>
2026-04-09 18:08:40 -04:00
Faith Ekstrand
91e6507665 nir: Add a nir_alu_src_comp_as_uint() helper
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40769>
2026-04-09 18:08:40 -04:00
Faith Ekstrand
567bc7a8df pan/bi: Simplify extract_i8 handling
Now that bi_byte() does the right thing, we can just use it and not
worry about the rest.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40769>
2026-04-09 18:08:40 -04:00
Faith Ekstrand
a88e724b6e pan/nir: Use minimum-width constants instead of scalar
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40769>
2026-04-09 18:08:39 -04:00
Faith Ekstrand
f138d13672 pan/nir: Stop being so conservative about phi scalarizing
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40769>
2026-04-09 18:08:25 -04:00
Faith Ekstrand
eca0575069 pan/nir: Stop doing manual optimization after resize_varying_io
We call bi_optimize_nir() a few lines later.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40769>
2026-04-09 18:07:53 -04:00