Commit graph

221018 commits

Author SHA1 Message Date
Kenneth Graunke
2780a327fa intel: add INTEL_JAY environment variable
Add a new environment variable controlling which shader stages use the
experimental compiler.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40835>
2026-04-10 18:21:21 +00:00
Alyssa Rosenzweig
4356ad1bf5 nir: add pixel_coord_intel
This is a 2x16 bitpacked version of load_pixel_coord which maps directly to the
hardware value and is much easier for Jay to consume due to the sadness that is
true 16-bit on Intel. Jay will lower to this internally.

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/40835>
2026-04-10 18:21:21 +00:00
Alyssa Rosenzweig
bd6d210386 nir: add shuffle_intel
Jay will use this to lower & optimize subgroup shuffles. This is closer to
how Intel hardware works but still much higher level than the hardware
primitive. This gets us NIR optimizations on the multiply however.

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/40835>
2026-04-10 18:21:21 +00:00
Alyssa Rosenzweig
b840b178af nir: add Intel RT write intrinsic
This exposes the underlying render target write message directly, which Jay will
use to lower RT writes in NIR. I'm still on the fence about what exactly this
should look like but this is good enough for GLES3.0 (so, multiple render
targets but not necessarily dual source blending).

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/40835>
2026-04-10 18:21:21 +00:00
Alyssa Rosenzweig
566047222e nir: add frag_coord_w_rcp intrinsic
This maps directly to what Intel's thread payload gives us, allowing us to
optimize out frcp's in some cases. Jay will use this.

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/40835>
2026-04-10 18:21:21 +00:00
Kenneth Graunke
09089fdd13 nir: Add nir_texop_sparse_residency[_txf]_intel operations
These lowered versions map to what Jay can deal with. The hardware is more
flexible but we're not due to data model restrictions. We choose to lower to get
us off the ground, we can revisit later.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40835>
2026-04-10 18:21:21 +00:00
Pavel Ondračka
79e3196320 gallium/u_blitter: remove unused CONST declaration when using IMM
The immediate fs_clear_color shader uses IMM[0] but still declares
CONST[0][0]. That can make drivers try to read a fragment constant
buffer even though one is never uploaded on this path. Only declare
CONST[0][0] when the shader actually uses a constant buffer.

Fixes: 2ff9fa8b72 ("gallium/u_blitter: add a new fs_color_clear variant")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40760>
2026-04-10 17:50:23 +00:00
David Rosca
33ab9087c8 radv/video: Remove unused function radv_vcn_sq_start
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Not used since 19a8b7121e ("radv/video: Remove old VCN and UVD decode implementation")

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40888>
2026-04-10 17:24:56 +00:00
Pavel Ondračka
5aa4bdc8e7 r300: fix BE CBZB clears for swapped 8888 formats
On big-endian hosts, r300 handles A8R8G8B8 and X8R8G8B8 by using
DWORD swap and programming component order as the matching B8G8R8A8 or
B8G8R8X8 formats. Reuse the same mapping when packing CBZB clear colors.

Fixes the bad lower-screen colors in Extreme TuxRacer on RV350.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40885>
2026-04-10 17:01:51 +00:00
Pavel Ondračka
c52bc90076 r300: fix BE 32-bit CBZB clear values
CBZB clears use ZB_DEPTHCLEARVALUE for the clear color. On big-endian
hosts the 32-bit payload needs little-endian byte order.

Fixes fast_color_clear/all-colors on RV350.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40885>
2026-04-10 17:01:50 +00:00
Raviraj Uppal
c5423d3e27 ac/nir: Fixed OpenGL CTS transform feedback overflow detection test case
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The ordered atomic commits the post-add offset to memory, but overflow was computed using the pre-add offset, causing partial overflows to be missed and counters to become corrupted.

Fixes: "KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream" based on the postwrite buffer offset, rather than the offset before the current workgroups writes.
Reviewed-by: Marek Olsak <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40745>
2026-04-10 15:43:21 +00:00
Boris Brezillon
f76e940fb2 pan/format: Advertise support for AFBC(16x16,sparse,split)
Some video decoders spit out AFBC(16x16,sparse,split) images. Advertise
support for this modifier so we can import such images.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40746>
2026-04-10 14:57:26 +00:00
Karmjit Mahil
718f90dd8c tu: Remove unecessary forward declaration
tu_queue.h is included so this isn't necessary.

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
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