Commit graph

16119 commits

Author SHA1 Message Date
Nanley Chery
da547a1a4d intel/blorp: Halve max bpp for some redescribed blits
We cannot use 128bpp formats with Y-tiling on gfx6 and prior.

Fixes: eb8883f3ef ("intel/blorp: Redescribe surfaces for copies")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15435
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41650>
2026-05-19 15:41:52 +00:00
Lionel Landwerlin
f19fc91c51 anv: bump max compute workgroup count
The HW can do up to UINT32_MAX but we're using that value to signal
indirect dispatch arguments.

A game like Resident Evil Requiem will use more than 64k on X
dimension.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41592>
2026-05-19 11:23:52 +00:00
Eric Engestrom
28f3f2569d meson/intel: only build libblorp_elk when requested
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
All users already depend on `idep_intel_blorp_elk`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41617>
2026-05-18 19:09:03 +00:00
Sergi Blanch Torne
70bf937c89 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit aaec108637.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41635>
2026-05-18 17:00:39 +00:00
Nemallapudi, Jaikrishna
e47ed60ee6 intel/dev: fix timebase_scale ticks-to-ns precision loss across 2^32
Android CTS CtsGpuProfilingDataTest#testProfilingDataProducersAvailable
intermittently fails with "Render stages reported before their
VkQueueSubmit events". Root cause is in the Perfetto clock correlation:
render-stage timestamps go through intel_device_info_timebase_scale()
while VkQueueSubmit packets use BOOTTIME directly, so any drift in the
scaler shows up as render stages preceding their submits.

intel_device_info_timebase_scale() scales the upper and lower halves
of the raw timestamp separately and recombines them, but silently
drops the upper-half division's remainder. When the frequency doesn't
evenly divide 1e9, every wrap past 2^32 loses a fixed number of ns
and shows up as a step in Perfetto's GPU-vs-BOOTTIME snapshot offset.

Carry the upper-half remainder into the lower-half numerator before
dividing, so no precision is lost. All intermediates still fit in
uint64_t.

Cc: mesa-stable
Signed-off-by: Nemallapudi, Jaikrishna <nemallapudi.jaikrishna@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41630>
2026-05-18 10:18:00 +00:00
Calder Young
f60749ff3c brw: Add support for ACCESS_CAN_REORDER memory ordering
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Passes the ACCESS_CAN_REORDER flag from NIR on to the backend so that we
can lower the loads to a non-volatile SEND. This allows the scheduler to
freely reorder them around stores or fences.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41008>
2026-05-17 19:03:24 +00:00
Calder Young
bb4878b203 brw: Allow instruction reordering around memory writes
Our scheduler is overly conservative about reordering instructions
around memory writes or fences. Fortunately, there are several simple
assumptions we can make about our IR to schedule these things a lot
more fluidly:

 * Unless its an EOT, a SEND instruction's side effects will only be
   observed through other SEND instructions

 * The effects of workgroup barriers, memory fences, and BRW_OPCODE_SYNC,
   are only used in the IR to synchronize SEND instructions

 * All other scheduler dependencies related to memory access are already
   expressed through the source and destination operands

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41008>
2026-05-17 19:03:24 +00:00
Caio Oliveira
3f8a083f28 intel/perf: Show type, data type and units in intel_perf_query_layout
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41623>
2026-05-17 16:21:08 +00:00
Caio Oliveira
3628d6e532 intel/perf: Add helpers to get names of enums
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41623>
2026-05-17 16:21:08 +00:00
Lionel Landwerlin
b24a4c3cd0 anv: temporarily reenable scratch page by default
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
A couple of games are showing pagefaults :
  - https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15450
  - https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15474

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 04bfdb287b ("anv: Disable scratch page by default on Xe KMD")
Reviewed-by: Calder Young <calder.young@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41596>
2026-05-15 19:47:12 +00:00
Caio Oliveira
f7fed3bdf8 intel/perf: Use intel_perf_context as ralloc parent of sample buffers
Prefer the context instead of the config structure.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41591>
2026-05-15 16:32:49 +00:00
Caio Oliveira
d3cfe04b3d intel: Move cmat configurations to anv_physical_device
Some cooperative properties are defined by the driver itself and
are not a property of the HW.  In particular whether the scope is
subgroup or workgroup is not directly related to the HW.

It could make sense encode the DPAS combinations into intel_device_info
but we are not using all possible combinations yet and wouldn't be very
useful in practice.

The new scheme was based on radv and will set us up for also filling
the flexible dimensions properties too.

Note: this also fixes a subtle issue where ARL was incorrectly inheriting
the PRE_XEHP configurations which included FLOAT16/FLOAT16/FLOAT16/FLOAT16
which it does not support.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41564>
2026-05-15 05:38:49 +00:00
Caio Oliveira
088eeb2d81 anv: When using INTEL_LOWER_DPAS disable BFloat16 cmat configurations
Those configurates are not currently supported by the
emulation pass brw_lower_dpas.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41564>
2026-05-15 05:38:49 +00:00
Caio Oliveira
6bcf70bd85 anv: Remove saturating cmat configurations when INTEL_LOWER_DPAS=1
Since we don't have any DPAS-based implementation of those, it is odd to
support them in the emulation mode that is only enabled with the debug
flag INTEL_LOWER_DPAS nowadays.  Remove it.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41564>
2026-05-15 05:38:48 +00:00
Lionel Landwerlin
682dc50776 brw/jay: move sample_mask_in handling to NIR
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41529>
2026-05-14 14:05:06 +00:00
Lionel Landwerlin
df5a6d7b87 brw/jay: move some coarse lowering to NIR
We add a pass to allow testing partially known fs config bits (main
user is DX11 always disabling VRS/coarse).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41529>
2026-05-14 14:05:06 +00:00
Lionel Landwerlin
ccef88173b anv: add SIMD32 requirement heuristic for Dragon Dogma 2
A few compute shaders are doing BC3 image generation on the device and
then generate incorrect data if running at SIMD16. That data is then
sampled in a vertex shader that generates incorrect geometry.

See https://github.com/ValveSoftware/Proton/issues/7595#issuecomment-4343662131

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41501>
2026-05-14 10:39:25 +00:00
Lionel Landwerlin
dfa7e15f7c brw: simplify VF component packing code
We can determine used components earlier.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41501>
2026-05-14 10:39:25 +00:00
Lionel Landwerlin
8e3084dfe6 anv: add an option to disable allocation over subscription
Usually I'm able to run B580 capture on LNL, but in some cases the
oversubscription on replay would lead to allocation failures.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41501>
2026-05-14 10:39:25 +00:00
Emma Anholt
76c39acad7 ci: Update VK CTS to 1.4.5.3 with fixes.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I've pulled in a pile of changes to reduce the overhead (runtime and
memory) when sharding for deqp-runner, along with a bunch of fixes for
KHR_display testing that we recently enabled, plus a few others that
affect our drivers.

The big new set of failures looks like it's from more complete coverage of
blitting between formats.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41243>
2026-05-14 04:22:21 +00:00
Caio Oliveira
771714a0ce brw/tests: Stop using regions/type for non-null SEND sources in tests
SEND operands don't have regions or types, hardware don't use those
bits except for possibly an old workaround.  So from the perspective
of assembler, we shouldn't need to add them.  For now brw_asm grammar
requires at least a type, so normalize to UD.

This will make easier to swap the parser syntax and code later.

Assisted-by: Pi coding agent (opus-4.7)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41456>
2026-05-14 01:29:13 +00:00
Caio Oliveira
08d805e03b brw/tests: Stop using regions/type for null in assembler tests
From the perspective of assembler, regions and types for ARF null are
not relevant -- so ignore them.  We still have some validation relying
on the byte-stride of the destination, so keep those for now.

In the long run, if a certain Gfx version HW requires some specific
matching, the encoder (or the parser) should take care of it.

This change will make easier to swap the parser syntax and code later.

Assisted-by: Pi coding agent (opus-4.7)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41456>
2026-05-14 01:29:13 +00:00
Caio Oliveira
7a12758b8c brw/tests: Remove redundant parser test
Same test a couple of lines above.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41456>
2026-05-14 01:29:12 +00:00
Caio Oliveira
e69df55ed7 intel/executor: Map the DPAS check to has_systolic
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41559>
2026-05-14 00:38:41 +00:00
Kenneth Graunke
f6debb842d jay: Gripe more clearly about dual source blending
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41535>
2026-05-13 23:03:15 +00:00
Kenneth Graunke
4f26c6b682 jay: Add a TODO for coarse pixel shading
This is a less obtuse error message for why things break.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41535>
2026-05-13 23:03:15 +00:00
Kenneth Graunke
4b4aad7c44 jay: Include depth and stencil on all MRT stores
The hardware expects it to be present for every colour target.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41535>
2026-05-13 23:03:15 +00:00
Kenneth Graunke
cee8d758ba anv: Use device->info.has_mesh_shading in key->mesh_input check
This is clearer than devinfo->verx10 >= 125.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41535>
2026-05-13 23:03:15 +00:00
Kenneth Graunke
fe99b5a7d1 anv: Delete anv_instance::mesh_conv_prim_attrs_to_vert_attrs
Never used.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41535>
2026-05-13 23:03:15 +00:00
Kenneth Graunke
faede3c3c1 intel/nir: Only add an explicit LOD 0 when lod/bias don't already exist
When lowering tg4 sparse testing to a non-gather opcode, we were adding
an explicit LOD 0 parameter.  But we might already have a LOD or bias.

Fixes tests like:
dEQP-VK.glsl.texture_gather.basic.2d.rgba8.base_level.sparse_level_1_amd_lod
dEQP-VK.glsl.texture_gather.basic.2d.rgba8.base_level.sparse_level_1_amd_bias

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41535>
2026-05-13 23:03:14 +00:00
Tapani Pälli
a18c07dc36 anv: allocate tile sized temporary copy instead of whole size
This fixes dEQP-VK.image.host_image_copy.* tests that require temp_copy
on 32bit builds.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15409
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41533>
2026-05-13 22:14:20 +00:00
Omar Rashwan
24669f2bbb intel: define type for std::max in eu stall viewer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41550>
2026-05-13 20:57:29 +00:00
Omar Rashwan
da047e32a5 intel: Fix bit width of int literal in eu stall viewer
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15417
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41550>
2026-05-13 20:57:29 +00:00
Hyunjun Ko
9836c70c56 anv/video: fix to set the upper bound of the bitstream of h265.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes:
dEQP-VK.video.decode.h265.long_term_reference_separated_dpb_video_layout
dEQP-VK.video.decode.h265.long_term_reference_layered_dpb_video_layout

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41537>
2026-05-13 18:02:11 +00:00
Karol Herbst
47bde74e91 ci: update OpenCL 3.1 piglit fails
Piglit does enforce the pre 3.1 behavior of clSetKernelArg

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
2026-05-13 15:21:40 +00:00
Dmitry Osipenko
85cb633871 intel/virtio: Preserve errno properly when handling ioctl
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Avoid changing errno when ioctl succeeds.

Fixes: b06d759a93 ("intel: Add virtio-gpu native context")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15446
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41512>
2026-05-13 11:34:11 +00:00
hwandy
c96e73aa93 Revert "intel/decoder: make libvulkan_intel to depend on stub decoder when buildtyle=release."
This reverts commit 2ee6b4d96e.

The previous change avoids 0.25MB (1%) size change on the driver binary file,
but blocks the runtime enablement for some intel tools which is critical
to our optimization tasks.

It's not a good tradeoff based on the new need of the tool in runtime,
so revert this change.

Test: meson setup builddir -Dallow-fallback-for=libdrm -D build-tests=true -Dbuildtype=release --reconfigure && ninja -C builddir && cd builddir && meson test

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: hwandy <hwandy@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41525>
2026-05-13 10:21:08 +00:00
Alyssa Rosenzweig
db95df3da4 jay/opt_propagate: propagate undefs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
allows deleting piles of moves & pressure.

simd16 results:

   Totals:
   Instrs: 2759547 -> 2753358 (-0.22%); split: -0.29%, +0.06%
   CodeSize: 41141280 -> 41071072 (-0.17%); split: -0.23%, +0.06%

   Totals from 332 (12.54% of 2647) affected shaders:
   Instrs: 648080 -> 641891 (-0.95%); split: -1.23%, +0.28%
   CodeSize: 9782272 -> 9712064 (-0.72%); split: -0.97%, +0.25%

simd32 is a loss because of RA being stupid. again, this is obviously the right
thing to do so we're doing it. stats are just a hint.

   Totals:
   Instrs: 4683556 -> 4689193 (+0.12%); split: -0.25%, +0.37%
   CodeSize: 70072256 -> 70171920 (+0.14%); split: -0.23%, +0.38%
   Number of spill instructions: 50320 -> 50316 (-0.01%)
   Number of fill instructions: 51530 -> 51526 (-0.01%)

   Totals from 351 (13.26% of 2647) affected shaders:
   Instrs: 1349954 -> 1355591 (+0.42%); split: -0.86%, +1.28%
   CodeSize: 20484224 -> 20583888 (+0.49%); split: -0.80%, +1.29%
   Number of spill instructions: 21762 -> 21758 (-0.02%)
   Number of fill instructions: 26328 -> 26324 (-0.02%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:36 +00:00
Alyssa Rosenzweig
21e527ceec jay/opt_propagate: fix NOT propagation
and add a test for it. oops.

Totals:
Instrs: 4700885 -> 4683707 (-0.37%); split: -1.36%, +1.00%
CodeSize: 70551872 -> 70285088 (-0.38%); split: -1.35%, +0.97%
Number of spill instructions: 50325 -> 50320 (-0.01%)
Number of fill instructions: 51541 -> 51530 (-0.02%)

Totals from 1261 (47.64% of 2647) affected shaders:
Instrs: 3932922 -> 3915744 (-0.44%); split: -1.63%, +1.19%
CodeSize: 59196320 -> 58929536 (-0.45%); split: -1.60%, +1.15%
Number of spill instructions: 47901 -> 47896 (-0.01%)
Number of fill instructions: 48420 -> 48409 (-0.02%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:36 +00:00
Alyssa Rosenzweig
5cbf0002c4 jay/register_allocate: tweak roundrobin heuristic
Totals:
Instrs: 4706214 -> 4700132 (-0.13%); split: -1.03%, +0.90%
CodeSize: 70628880 -> 70540336 (-0.13%); split: -1.02%, +0.89%

Totals from 2084 (78.73% of 2647) affected shaders:
Instrs: 4515981 -> 4509899 (-0.13%); split: -1.08%, +0.94%
CodeSize: 67822800 -> 67734256 (-0.13%); split: -1.06%, +0.93%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:35 +00:00
Alyssa Rosenzweig
37e4144693 jay/register_allocate: set num_regs[MEM] properly
this is both a correctness fix (insufficient MEM registers reserved in some
cases) and a performance fix (unnecessary allocations & zeroing in the RA when
we don't spill).

fixes dEQP-VK.dgc.ext.compute.misc.scratch_space

stats are noise but positive i guess.

Totals from 35 (1.32% of 2647) affected shaders:
Instrs: 396770 -> 396690 (-0.02%)
CodeSize: 6040832 -> 6039600 (-0.02%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:35 +00:00
Alyssa Rosenzweig
d67e37a24c jay/lower_scoreboard: use sbid syncs to elide regdist deps
Totals from 1522 (57.50% of 2647) affected shaders:
CodeSize: 65268400 -> 65056176 (-0.33%); split: -0.33%, +0.00%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:35 +00:00
Alyssa Rosenzweig
89e33407e4 jay/lower_scoreboard: use CFG for RegDist scoreboarding
this is now properly global.

Totals from 558 (21.08% of 2647) affected shaders:
CodeSize: 42098496 -> 42078256 (-0.05%); split: -0.05%, +0.00%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:35 +00:00
Alyssa Rosenzweig
c2a423b5b5 jay/lower_scoreboard: rename gpr_range -> key
for clarity since UGPRs are here too.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:34 +00:00
Alyssa Rosenzweig
d549fb9c04 jay/lower_scoreboard: compact inst_exec_pipe
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:34 +00:00
Alyssa Rosenzweig
adaae3baf1 jay/lower_scoreboard: control flow is int pipe
according to IGC output.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:34 +00:00
Alyssa Rosenzweig
039b76d07c jay/lower_scoreboard: factor regdist logic out
no change, just hoisting the loop & reindenting.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:33 +00:00
Alyssa Rosenzweig
a7b8395c15 jay/lower_scoreboard: run RegDist globally
poking around, it seems branches stall the pipelines so we don't need to do any
dataflow analysis, but we do need to fall through for correctness. just keep
going across block boundaries. this isn't optimal yet but it reduces a
pile of A@1's already.

Totals from 1389 (52.47% of 2647) affected shaders:
CodeSize: 56385376 -> 56325776 (-0.11%); split: -0.13%, +0.03%

--

this also fixes issues where the first instruction of a block is a SEND that has
an unmet register dependency, since the old code was fundamentally broken. oops.
lol. fixes
dEQP-VK.compute.pipeline.workgroup_memory_explicit_layout.zero.uint8_t_array_to_uint_array_1
among many others.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:33 +00:00
Alyssa Rosenzweig
52224bb597 jay/lower_scoreboard: refactor
no functional change, just reshuffling code for next commit.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:33 +00:00
Alyssa Rosenzweig
3a7baf2cde jay/lower_scoreboard: fix trivial scheduling
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:32 +00:00