Commit graph

16343 commits

Author SHA1 Message Date
Kenneth Graunke
b1b579293a jay: Handle facing that differs across subspans
Will be useful for multipolygon modes.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:20 +00:00
Kenneth Graunke
e3d7d4a77d jay: Generalize EXTRACT_LAYER to take an arbitrary mask
This will let us use it for the other per-pair-of-subspan fields too.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:20 +00:00
Alyssa Rosenzweig
2c9df4caad jay: workaround the while bug
fixes dEQP-VK.reconvergence.maximal.compute.nesting2.6.2

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:20 +00:00
Alyssa Rosenzweig
ccf936dd9f jay: fix mismatched files with predication
fixes dEQP-VK.rasterization.line_continuity.line-strip

jay shader validation failed (after jay_opt_propagate_backwards):
   invalid instruction in block 7: f281 = (-uf55/uf55)cmp.s32.ne u265, 0xFFFFFFFF
   assertion failed at ../src/intel/compiler/jay/jay_validate.c:233
   jay_inst_get_default(I)->file == dst.file

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:20 +00:00
Alyssa Rosenzweig
31d02365d8 jay/assign_flags: require ballots to be in the balloted src
otherwise we get garbage in the other lanes. this was a pain to debug.
dEQP-VK.subgroups.clustered.compute.subgroupclusteredand_bvec2

this should be optimized (and maybe reworked/simplified too) but now this should
be /correct/ at least.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
8ff543ec6a jay: fix 8/16-bit inline_data loads
dEQP-VK.spirv_assembly.instruction.compute.untyped_pointers.vulkan_memory_model.type_punning.load.push_constant.vec4_float16_to_float64

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
a110a4a6d6 jay/validate: add validation for bogus uflag cases
this would've caught the previous bug

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
8b75e06196 jay: add unit test for bogus copyprop case
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
16927d537c jay: avoid bogus copyprop with cmods
fixes dEQP-VK.sparse_resources.shader_intrinsics.3d_sparse_fetch.r16.503_137_3

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Kenneth Graunke
65697d6438 jay: Remember sp_delta_B when rematerializing stack pointer lane 0
The stack pointer starts out at b.shader->scratch_size, plus per-lane
offsets.  Every time we spill/fill, we adjust the stack pointer to
the offset for our desired memory location, and leave it there.  Over
the course of each block's spills/fills, we track the current delta from
the original value, and restore it to there at the end of the block.

However, when we started clobbering lane 0 and rematerializing it,
we were recreating it as the original base value (b.shader->scratch_size
+ sizeof(uint32_t) * 0).  We need to include sp_delta_B too, or else we
will calculate our deltas incorrectly for that lane, and restore it
incorrectly at the end of the block too.

Found while debugging the issue fixed by the previous commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Kenneth Graunke
5e157f3e6a jay: Fix scratch surface address save/restore
The idea here is that the scratch surface address is stored in
ADDRESS_REGISTER, while per-lane offsets are stored in `sp', an
array of UGPR[dispatch_width].  When we encounter an opcode that
needs to clobber the address register, we stash it in the first
UGPR of `sp'.  This clobbers the first lane offset, but that's
easy to reconstruct since it's lane 0.  When we need to spill/fill,
we restore the address register and rematerialize the offset for
lane 0.

This is all good.  However, we were saving the address register
every time we found an opcode that clobbered it...even if we'd
_already_ clobbered it.  So if you had back to back shuffles,
the first would save the scratch surface address, and the second
would save...some part of the first shuffle.  So we'd never get
the scratch address back again.  Easy fix, only save if valid.

Fixes misrendering in Baldurs Gate 3 compute shaders.

Fixes: 64acab1d69 ("jay/lower_spill: use 1 less temporary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
40276305fa jay/to_binary: big clean up post-gen
instead of appending instructions like brw_eu helpers, just construct a single
gen_inst at a time. this involves a lot less indirection.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
ee72fcc8fc jay: lower JAY_OPCODE_LOOP_ONCE earlier
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
6708364d83 jay/lower_scoreboard: allow multiple jumps
for next commit

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
41abff84ec jay: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
5ff84fedc1 jay: drop dead if
relic from before we had npot stuff wired good.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
96c9878153 jay/partition: reduce 16-bit partitioning more
affects conversions etc.

SIMD16:
   Totals from 811 (30.64% of 2647) affected shaders:
   Instrs: 1710558 -> 1709635 (-0.05%); split: -0.17%, +0.12%
   CodeSize: 25412768 -> 25417424 (+0.02%); split: -0.21%, +0.23%

SIMD32:
   Totals from 1070 (40.42% of 2647) affected shaders:
   Instrs: 2368611 -> 2327748 (-1.73%); split: -1.89%, +0.17%
   CodeSize: 35487424 -> 34847968 (-1.80%); split: -1.92%, +0.12%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
1d1598d6d7 jay/register_allocate: don't hang if a block is missing
handle gracefully.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
87ce33bbf3 jay: replace BYTE/WORD_PACK with a simple MOV
Equivalent now that the IR allows it.

For the dynamic case:

< (32&W)      mov.u16 g0, g38<16,8,2>                             │ I@1
---
> (32&W)      mov.u16 g0, g38<2>                                  │ I@1

For the constant case it's actually better since copyprop can see through it:

< (1&W)       mov.u32 u0.0, 0xaaaaaaaa                            │
< (32&W)      mov.u16 g1, u0.0                                    │ I@1
---
> (32&W)      mov.u16 g0, 0xaaaa                                  │

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
6bf1dc6a48 jay: replace GPR_FROM_UGPRs with a simple CVT
use the new implicit UGPR-vector-source-as-GPR mechanism to avoid the special
op. the new code gen is slightly different but not meaningfully worse:

(32)        mov.u32 g14, g2:u16                                 │
(32)        mov.f32 acc0, g14<4>:u8                             │ I@1
(32)        mul.f32 g18, acc0, 0x3d800000 /* 0.0625 */          │
(32)        mov.u32 g20, g14.1<4>:u8                            │ I@1
(32)        mov.f32 acc0, g20<4>:u8                             │ I@1
(32)        mul.f32 acc0, acc0, 0x3d800000 /* 0.0625 */         │

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
1ce2d57a31 jay: rework lane ID calculations
Previously we had special ops doing data model breaking things on GPRs. But
there's no real reason for that, we can calculate lane IDs as UGPR vectors
within the Jay data model just fine. Adjust jay_ir/jay_validate to define packed
16-bit UGPR vectors, giving them the natural semantics, then use that to
calculate lane IDs, peeling back all the hacks we added along the way.

This also unfortunately pessimizes inverse_ballot() but only in a corner case
that could be revisited later. Stats are net positive.

In addition to the code clean up, this has 3 other benefits:

* Now that we can rematerialize the lane ID code anywhere we want, we could
  theoretically reduce register pressure in some scenarios. Stats show this
  doesn't help in the current implementation, though.

* Now that we can calculate lane IDs in control flow, the issues with divergent
  function calls all go away. (Well, the lane ID issue. There are other issues.)

* Now that we use UGPRs for this, we don't need a stride=16 GRF in shaders that
  don't actually use 16-bit math, meaning less shuffling from bad partitions.
  That's reflected in the positive stats here.

SIMD16:
   Totals from 1643 (62.07% of 2647) affected shaders:
   Instrs: 2227750 -> 2221032 (-0.30%); split: -0.44%, +0.14%
   CodeSize: 33138416 -> 33034224 (-0.31%); split: -0.52%, +0.20%

SIMD32:
   Totals from 1643 (62.07% of 2647) affected shaders:
   Instrs: 2864583 -> 2806217 (-2.04%); split: -2.22%, +0.19%
   CodeSize: 43088064 -> 42171504 (-2.13%); split: -2.29%, +0.17%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
3ededec51c jay: generalize jay_extract_range_post_ra
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
0adcaeced4 jay/to_binary: relax packed float restriction
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
61d65c8055 jay: limit stencil export to simd16
sigh.

fixes dEQP-VK.pipeline.monolithic.shader_stencil_export.s8_uint.op_replace

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
c9eb9ea52a jay/partition: pick better partitions
look at what the program actually does instead of hardcoding a worst-case.

SIMD16:
   Totals from 1965 (74.23% of 2647) affected shaders:
   Instrs: 2603230 -> 2539932 (-2.43%); split: -3.44%, +1.01%
   CodeSize: 38826160 -> 37811904 (-2.61%); split: -3.59%, +0.97%
   Number of spill instructions: 1206 -> 555 (-53.98%)
   Number of fill instructions: 1194 -> 551 (-53.85%)

SIMD32:
   Totals from 1974 (74.57% of 2647) affected shaders:
   Instrs: 3998126 -> 3033333 (-24.13%); split: -24.18%, +0.05%
   CodeSize: 59563952 -> 45580448 (-23.48%); split: -23.52%, +0.05%
   Number of spill instructions: 43534 -> 37471 (-13.93%); split: -13.97%, +0.04%
   Number of fill instructions: 43118 -> 36412 (-15.55%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
7221ef0230 jay/partition: validate we don't generate g127<2>
GPU hangs with a buggy version of the next patch. EU validate misses this :(

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
3905c7156d jay/register_allocate: drop #include
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
d8b2ba91e8 jay/register_allocate: split out jay_stride.c
These queries need to be used for partitioning too. And also this degunks the
core RA logic in jay_register_allocate.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
e900ac1750 jay/register_allocate: remove remnant of old partition code
We no longer delete from num_regs for spilling now.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
5cff4cca3a jay/register_allocate: do not treat reserved regs as free
would blow up with partition changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Alyssa Rosenzweig
712a19bef2 jay/validate_ra: validate against partition
this programatically catches a few more classes of errors.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41872>
2026-06-03 15:23:19 +00:00
Nanley Chery
2581ae572b anv: Allow partial depth fast clears on gfx12+
Not sure if any workload uses this. This mostly allows us to document
the functionality of HSD 22011236099 on gfx20+.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41712>
2026-06-03 00:51:29 +00:00
Nanley Chery
6f7baf4e7d anv: Skip some CCS performance warnings on gfx9-11
These platforms don't support CCS on MCS/HIZ/STC. There's nothing we can
do about this. So, stop warning about it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41712>
2026-06-03 00:51:28 +00:00
Nanley Chery
888ea50760 anv: Dedent a closing curly brace
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41712>
2026-06-03 00:51:28 +00:00
Nanley Chery
ee40162321 intel/isl: Fix the initial state HiZ state for Xe2+
HSD 22011236099 actually states that there are no illegal values for HiZ
for partial clear operations. Other operations (e.g., copies) may still
result in corruption without a preceding ambiguate.

Fixes: a13aab1859 ("intel/isl: Update the initial HiZ state for Xe2+")
Related: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40987
Tested-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41712>
2026-06-03 00:51:27 +00:00
Caio Oliveira
94fc269270 jay: Add INTEL_DEBUG=mda support
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41897>
2026-06-03 00:24:49 +00:00
Caio Oliveira
6701351645 jay: Unify macro for NIR passes
This is a preparation for enabling INTEL_DEBUG=mda in Jay.  Since we are
changing the passes to use a new macro, go ahead and use new JAY_NIR_*
macros so we don't have to rename them again when their implementation
gets decoupled from BRW.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41897>
2026-06-03 00:24:49 +00:00
Paulo Zanoni
a268f79ce1 intel/tools: fix stall_csv_filename maybe-unitialized error
On Release builds, I get this:

../../src/intel/tools/intel_eu_stall_viewer.cpp: In function ‘int main(int, char**)’:
../../src/intel/tools/intel_eu_stall_viewer.cpp:269:27: warning: ‘stall_csv_filename’ may be used uninitialized [-Wmaybe-uninitialized]
  269 |    if (!shaders_directory || !stall_csv_filename) {
      |        ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../../src/intel/tools/intel_eu_stall_viewer.cpp:244:43: note: ‘stall_csv_filename’ was declared here
  244 |    const char *shaders_directory = NULL, *stall_csv_filename;

We can't expect gcc to understand that it's a required argument.

This "fixes" b795a1a20c ("intel/tools: add eu stall viewer").

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41946>
2026-06-02 22:01:01 +00:00
Emma Anholt
2595e4a972 util/drirc_gen: Move the common VK WSI options to a core helper function.
I didn't want to copy and paste this again for tu.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41877>
2026-06-02 18:49:48 +00:00
Emma Anholt
3ad3bb33d1 util/drirc_gen: Reduce manual importing of functions.
I wanted to use another common function, and having to manual import it
felt silly given that we're a drirc_gen user.  But we are limited because
we don't have the common code in the system path at startup, so we can't
just import it at module level.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41877>
2026-06-02 18:49:48 +00:00
Ian Romanick
dcfc90a8fc nir/algebraic: Convert bcsel of addition to addition of b2i or b2f
Recent changes to continue handling in loops results in many cases of

    loop {
        ...
	if (...) {
	    do_continue = true; // was continue;
	}

	i = do_continue ? i : i + 1;
    }

I noticed this while investigating mesa#15154. Unfortunately, this
doesn't fix the performance regressions noted in that issue.

One fragment shader in XCOM: Enemy Unknown doesn't like this change. :(

v2: Drop _nsz from a couple bcsel patterns where it is not needed.
Suggested by Georg.

v3: Drop ~ from the last two fadd patterns. Suggested by Georg. Update
expected checksum for plot3d-v2.trace on many platforms.

shader-db:

All Iris platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 17089936 -> 17086837 (-0.02%)
instructions in affected programs: 864928 -> 861829 (-0.36%)
helped: 696 / HURT: 110

total cycles in shared programs: 864096306 -> 863913752 (-0.02%)
cycles in affected programs: 345726340 -> 345543786 (-0.05%)
helped: 620 / HURT: 196

total spills in shared programs: 3318 -> 3319 (0.03%)
spills in affected programs: 14 -> 15 (7.14%)
helped: 0 / HURT: 1

total fills in shared programs: 1604 -> 1606 (0.12%)
fills in affected programs: 28 -> 30 (7.14%)
helped: 0 / HURT: 1

total sends in shared programs: 876852 -> 876850 (<.01%)
sends in affected programs: 6 -> 4 (-33.33%)
helped: 2 / HURT: 0

fossil-db:

Lunar Lake
Totals:
Instrs: 914468779 -> 914215874 (-0.03%); split: -0.03%, +0.00%
CodeSize: 12885732160 -> 12881939568 (-0.03%); split: -0.04%, +0.01%
Cycle count: 100100279922 -> 100096866800 (-0.00%); split: -0.05%, +0.04%
Spill count: 3459786 -> 3459693 (-0.00%); split: -0.01%, +0.01%
Fill count: 4909835 -> 4909177 (-0.01%); split: -0.04%, +0.03%
Max live registers: 191819298 -> 191822052 (+0.00%); split: -0.00%, +0.00%
Max dispatch width: 48511264 -> 48510608 (-0.00%); split: +0.00%, -0.00%
Non SSA regs after NIR: 136334891 -> 136301926 (-0.02%); split: -0.03%, +0.00%

Totals from 37416 (1.87% of 2003390) affected shaders:
Instrs: 53346249 -> 53093344 (-0.47%); split: -0.48%, +0.01%
CodeSize: 775396384 -> 771603792 (-0.49%); split: -0.60%, +0.11%
Cycle count: 32275003526 -> 32271590404 (-0.01%); split: -0.14%, +0.13%
Spill count: 569304 -> 569211 (-0.02%); split: -0.05%, +0.03%
Fill count: 620240 -> 619582 (-0.11%); split: -0.31%, +0.21%
Max live registers: 6712048 -> 6714802 (+0.04%); split: -0.01%, +0.05%
Max dispatch width: 893344 -> 892688 (-0.07%); split: +0.10%, -0.17%
Non SSA regs after NIR: 7191473 -> 7158508 (-0.46%); split: -0.49%, +0.03%

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 985625036 -> 985366432 (-0.03%); split: -0.03%, +0.00%
CodeSize: 16446268768 -> 16442606864 (-0.02%); split: -0.03%, +0.01%
Cycle count: 91278956920 -> 91272371300 (-0.01%); split: -0.07%, +0.06%
Spill count: 3713935 -> 3714003 (+0.00%); split: -0.00%, +0.00%
Fill count: 5001514 -> 5001259 (-0.01%); split: -0.03%, +0.02%
Max live registers: 120736970 -> 120738919 (+0.00%); split: -0.00%, +0.00%
Max dispatch width: 37827808 -> 37829472 (+0.00%); split: +0.01%, -0.00%
Non SSA regs after NIR: 160606595 -> 160573270 (-0.02%); split: -0.02%, +0.00%

Totals from 38664 (1.71% of 2265137) affected shaders:
Instrs: 53621392 -> 53362788 (-0.48%); split: -0.49%, +0.01%
CodeSize: 932994544 -> 929332640 (-0.39%); split: -0.52%, +0.13%
Cycle count: 24442489628 -> 24435904008 (-0.03%); split: -0.25%, +0.22%
Spill count: 550952 -> 551020 (+0.01%); split: -0.02%, +0.03%
Fill count: 525010 -> 524755 (-0.05%); split: -0.27%, +0.23%
Max live registers: 3594805 -> 3596754 (+0.05%); split: -0.01%, +0.07%
Max dispatch width: 510928 -> 512592 (+0.33%); split: +0.47%, -0.14%
Non SSA regs after NIR: 7652247 -> 7618922 (-0.44%); split: -0.46%, +0.03%

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 997905938 -> 997771670 (-0.01%); split: -0.01%, +0.00%
CodeSize: 13990460928 -> 13988346016 (-0.02%); split: -0.02%, +0.00%
Cycle count: 83465002175 -> 83456829524 (-0.01%); split: -0.02%, +0.01%
Spill count: 3815020 -> 3814879 (-0.00%); split: -0.01%, +0.00%
Fill count: 6561078 -> 6560768 (-0.00%); split: -0.01%, +0.00%
Max live registers: 121468149 -> 121468160 (+0.00%); split: -0.00%, +0.00%
Max dispatch width: 37914400 -> 37914624 (+0.00%); split: +0.00%, -0.00%
Non SSA regs after NIR: 155941530 -> 155944033 (+0.00%); split: -0.00%, +0.00%

Totals from 27771 (1.22% of 2273117) affected shaders:
Instrs: 31224666 -> 31090398 (-0.43%); split: -0.44%, +0.01%
CodeSize: 450250800 -> 448135888 (-0.47%); split: -0.57%, +0.10%
Cycle count: 15045135658 -> 15036963007 (-0.05%); split: -0.13%, +0.08%
Spill count: 406812 -> 406671 (-0.03%); split: -0.05%, +0.01%
Fill count: 391210 -> 390900 (-0.08%); split: -0.10%, +0.02%
Max live registers: 2592759 -> 2592770 (+0.00%); split: -0.02%, +0.02%
Max dispatch width: 383888 -> 384112 (+0.06%); split: +0.23%, -0.17%
Non SSA regs after NIR: 4221402 -> 4223905 (+0.06%); split: -0.01%, +0.07%

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41871>
2026-06-02 17:44:14 +00:00
Alyssa Rosenzweig
b4cd4428b3 intel/gen: drop noisy build spam
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise this shows up in the ninja build.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41944>
2026-06-01 21:02:09 +00:00
Alyssa Rosenzweig
7eb248ba9f intel/gen: remove dead #include
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41944>
2026-06-01 21:02:09 +00:00
Caio Oliveira
74d38a6271 intel/gen: Change validation test code to use the parser
Assisted-by: Pi coding agent (GPT-5.5)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41918>
2026-06-01 16:02:41 +00:00
Sid Pranjale
020a6bc282 vulkan: implement VK_EXT_debug_marker
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32722>
2026-06-01 15:31:38 +00:00
Kenneth Graunke
405c99d0a6 jay: Add URB load support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
2026-06-01 08:30:25 +00:00
Kenneth Graunke
9c8f7c481f brw: Fold constants after nir_lower_io for VS/GS/TES outputs
brw_nir_lower_deferred_urb_writes assumes that constant offsets will be
properly folded.  In brw itself we call the big optimization loop which
takes care of this, but jay doesn't do that in-between.

At any rate, nir_lower_io generates a lot of address math that really
ought to get cleaned up, so it seems like a good point to call it here.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
2026-06-01 08:30:25 +00:00
Kenneth Graunke
fb99a109e4 brw: Fix mistake in brw_nir_lower_deferred_urb_writes
I meant to add these together, not put a random semicolon in the middle
of the expression which meant the offset got tossed on the floor.

Fixes: 6fbe201a12 ("brw: Convert VS/TES/GS outputs to URB intrinsics.")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
2026-06-01 08:30:25 +00:00
Kenneth Graunke
c798a9df1c brw: Refactor urb_read_length setting for TES
We now calculate it when emitting push input loads at the NIR level,
rather than in the backend.

v2: Fix missing interaction with legacy tesslevel remapping

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
2026-06-01 08:30:24 +00:00
Kenneth Graunke
4dfa11a9d6 brw: Ensure entire input load fits in push data
We were seeing if the start of the load was within the push range,
rather than the entire load.  (We could also split loads, but that
seems needlessly complex.)

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
2026-06-01 08:30:24 +00:00