Commit graph

220982 commits

Author SHA1 Message Date
Mel Henning
3476b34f63 nvk/lower_descriptors: Change ROOT_DESC addr space
The more general address space we used to have cannot be
implemented on top of ROOT_TABLE because of ROOT_TABLE's bank pattern.
Instead, adjust the address space so it provides a less general index
into dynamic_buffers.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40639>
2026-04-10 19:21:37 +00:00
Mel Henning
e53036c85a nvk/lower_descriptors: Add load_root_table_array()
This is a helper function for loading from an index of an array member
of root_table.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40639>
2026-04-10 19:21:36 +00:00
Mel Henning
5d90bbe8e5 nvk/lower_descriptors: .base in load_root_table
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40639>
2026-04-10 19:21:36 +00:00
Mel Henning
4bdbd6c341 nvk/lower_descriptors: Use more load_root_table
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40639>
2026-04-10 19:21:36 +00:00
Mel Henning
153454a6fd nvk/lower_descriptors: Move load_root_table up
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40639>
2026-04-10 19:21:36 +00:00
Alyssa Rosenzweig
fc00e2c815 anv: wire up jay
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
c96762ad57 iris: wire up jay
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
e42e319313 intel: add Jay
Jay is a new SSA-based compiler for Intel GPUs. This is an early
work-in-progress. It isn't ready to ship, but we'd like to move development in
tree rather than rebasing the world every week. Please don't bother testing yet
- we know the status and we're working on it!

Jay's design is similar to other modern NIR backends, particularly ACO, NAK and
AGX. It is fully SSA, deconstructing phis after RA. We use a Colombet register
allocator similar to NAK, allowing us to handle Intel's complex register
regioning restrictions in a straightforward way. Spilling logical registers is
straightforward with Braun-Hack.

Thanks to the SSA-based design, the entire backend is essentially linear time,
regardless of register pressure, addressing brw's excessive compile time when
especially spilling with brw.

In this current early draft, we support a limited subset of all three APIs on
Xe2. A lot works and a lot doesn't. The core compiler is there (spilling,
scoreboarding, SIMD32, etc should more or less work), but there are details to
fill in for both performance and correctness. We essentially pass conformance on
OpenGL ES 3.0 and OpenCL 3.0, and we're busy iterating on Vulkan.

Likewise, additional hardware support will come down the line. There's nothing
fundamentally Xe2-specific here. I just have a Lunarlake laptop on my desk, Ken
has a Battlemage card, and we had to pick _something_ as the first target.

Co-authored-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40835>
2026-04-10 18:21:21 +00:00
Kenneth Graunke
7468261d3d intel/nir: Make intel_nir_lower_sparse work for either brw or jay
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
5c4cae2661 brw: lower ifind_msb for Jay
I'm not sure brw wants the common lowering but Jay definitely does.

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
3afd572d8f brw: add Jay-specific SIMD selection rule
In the future this might even do something clever.

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
f33454e35a brw: disable nir_opt_uniform_atomics for Jay
While Jay supports subgroups, efficient reductions are TODO so it's probably
better not to run this pass yet.

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
4778fc1ab7 brw: disable hw generate local ID for jay
Jay will need more work to handle these payloads properly especially in SIMD32.
For now just disable the optimization for Jay for correctness.

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
e8b9f26561 brw: subgroup lowering for jay
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
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