Commit graph

224362 commits

Author SHA1 Message Date
Alyssa Rosenzweig
091e6976d9 jay: allow more 3-src imms
SIMD16:
   Totals from 2082 (78.66% of 2647) affected shaders:
   Instrs: 2349636 -> 2345856 (-0.16%); split: -0.23%, +0.06%
   CodeSize: 32796448 -> 32748448 (-0.15%); split: -0.30%, +0.15%

SIMD32:
   Totals from 2081 (78.62% of 2647) affected shaders:
   Instrs: 2609349 -> 2604746 (-0.18%); split: -0.27%, +0.09%
   CodeSize: 37148624 -> 37077824 (-0.19%); split: -0.34%, +0.15%
   Number of spill instructions: 13104 -> 13094 (-0.08%)
   Number of fill instructions: 32677 -> 32662 (-0.05%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42097>
2026-06-15 17:29:15 +00:00
Alyssa Rosenzweig
e673e68ac3 jay/register_allocate: don't search a 2nd UGPR temp
unused

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42097>
2026-06-15 17:29:15 +00:00
Alyssa Rosenzweig
ec1a9d353a jay/register_allocate: simplify split copy logic
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42097>
2026-06-15 17:29:15 +00:00
Alyssa Rosenzweig
178983f51b jay/validate: check for mixed ugpr/gpr problems
hit with spilling stuff.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42097>
2026-06-15 17:29:15 +00:00
Alyssa Rosenzweig
8943077cb9 jay: fix bogus unit tests
will fail validation with next commit.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42097>
2026-06-15 17:29:15 +00:00
Alyssa Rosenzweig
8863fd74e4 jay/spill: simplify limit()
stats look like mostly noise - qsort() is not a stable sort.

SIMD16:
   Totals from 10 (0.38% of 2647) affected shaders:
   Instrs: 225879 -> 225843 (-0.02%); split: -0.03%, +0.02%
   CodeSize: 3237440 -> 3237152 (-0.01%); split: -0.03%, +0.02%

SIMD32:
   Totals from 151 (5.70% of 2647) affected shaders:
   Instrs: 922754 -> 923121 (+0.04%); split: -0.15%, +0.19%
   CodeSize: 13313364 -> 13318004 (+0.03%); split: -0.15%, +0.18%
   Number of spill instructions: 7510 -> 7452 (-0.77%)
   Number of fill instructions: 22819 -> 22845 (+0.11%); split: -0.01%, +0.12%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42097>
2026-06-15 17:29:15 +00:00
Alyssa Rosenzweig
32ace4f400 jay/spill: drop sketchy heuristic
I did this for AGX for some Blender shader but apparently it's not doing all
that much for Jay!

SIMD16:
   Totals from 0 (0.00% of 2647) affected shaders:

SIMD32:
   Totals from 8 (0.30% of 2647) affected shaders:
   Instrs: 29566 -> 29255 (-1.05%); split: -1.08%, +0.03%
   CodeSize: 432672 -> 427408 (-1.22%); split: -1.24%, +0.02%
   Number of spill instructions: 799 -> 658 (-17.65%)
   Number of fill instructions: 1010 -> 906 (-10.30%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42097>
2026-06-15 17:29:15 +00:00
Alyssa Rosenzweig
bcd958cb89 jay/spill: refactor
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42097>
2026-06-15 17:29:15 +00:00
Alyssa Rosenzweig
c96dba7e47 jay/spill: unstub rematerialization
Once we start spilling UGPRs, this will become interesting.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42097>
2026-06-15 17:29:15 +00:00
Alyssa Rosenzweig
97a44c138d jay/spill: do initial find-and-replace for ugpr spilling
doesn't solve any of the hard problems yet, just getting prepped.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42097>
2026-06-15 17:29:15 +00:00
Alyssa Rosenzweig
99a2538029 jay/spill: spill at definitions
Braun-Hack has a complex algorithm to insert spills on-demand when pressure
exceeds the limit, with fix ups along control flow to ensure we spill along each
execution path. Faith implemented a slightly different version in NAK which is
what Jay did, with some nonobvious tradeoffs between the two.

But actually.. why are we doing this at all?

We can alternatively spill immediately after the definition, which guarantees
(by the usual properties of dominance) that the spill executes before any
reloads. Then we don't need any tricky bookkeeping or control flow fixups.
Beyond the simplification, this has a couple advantages:

* Lower register pressure throughout more of the program. This doesn't affect
  the /amount/ of spilling, but it gives RA more freedom so should reduce
  shuffling. This in itself probably justifies doing this.

* Less SSA repair needed around memory definitions, which can reduce memory
  traffic due to our naive memory definition handling. (I think if we
  implemented Braun-Hack properly with CSSA this would be less of a concern, but
  whatever.)

* Less reliance on the "no critical edges" property which will come in handy for
  UGPR spilling, this is a yak shave for that.

* No risk of executing the same spill twice due to divergence (if we spill
  inside of a divergent IF). This means this commit is probably a better idea
  for GPUs than CPUs in practice.

This also has a couple of disadvantages explaining why the paper didn't do this:

* If a value only needs to be spilled/filled in conditional control flow, this
  executes extra spills. But, spills are cheaper than fills (they burn bandwidth
  but have basically no latency since they're stores), so I'm not super
  concerned about this corner case.

* If a value is defined in a loop and needs to be spilled due to a use outside
  the loop, it spills N times instead of 1. This is more compelling reason to do
  the paper's think. But we demand the input program is LCSSA so this shouldn't
  actually happen for us.

* The spill stalls on the definition value. That's probably not a big deal and
  the eventual post-RA scheduler should be able to cope.

Overall I think this is a reasonable direction. We can revisit later but I don't
want to add more complexity to the spiller than absolutely necessarily, and it's
about to be necessary to add complexity for UGPRs.

SIMD16:
   Totals from 17 (0.64% of 2647) affected shaders:
   Instrs: 250304 -> 249221 (-0.43%); split: -0.44%, +0.01%
   CodeSize: 3476640 -> 3461312 (-0.44%); split: -0.45%, +0.01%
   Number of spill instructions: 555 -> 223 (-59.82%)
   Number of fill instructions: 551 -> 543 (-1.45%)

SIMD32:
   Totals from 420 (15.87% of 2647) affected shaders:
   Instrs: 1779193 -> 1698683 (-4.53%); split: -4.53%, +0.01%
   CodeSize: 25455456 -> 24198416 (-4.94%); split: -4.95%, +0.01%
   Number of spill instructions: 36900 -> 14440 (-60.87%)
   Number of fill instructions: 36550 -> 35103 (-3.96%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42097>
2026-06-15 17:29:15 +00:00
Alyssa Rosenzweig
68b21aa375 nir/lower_terminate_to_demote: tweak terminate_if lowering
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This saves instructions on Jay. We probably could teach backend predication to
chew thru the mess, but I don't see a reason not to just do this everywhere.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42197>
2026-06-15 16:12:44 +00:00
Lorenzo Rossi
706d431d08 pan/bifrost: Fix 16-bit demote_if
Right now demote_if only works with 32-bit registers but in NIR it can
also have 16-bit sources, we have a couple of bug on those.  First is
during NIR->BIR translation (h0 swizzle was not set), second is in
discard_b32 to discard_f32 lowering (bifrost has restrictions).

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42197>
2026-06-15 16:12:44 +00:00
Caio Oliveira
10486d0dbc nir: Handle nir_var_mem_push_const in divergence analysis
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42243>
2026-06-15 15:33:13 +00:00
Jose Maria Casanova Crespo
cdc6a0bfed v3dv: allow TFU readahead padding above maxMemoryAllocationSize
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Our get_buffer/image_memory_requirements() pad TRANSFER_SRC resources
with V3D_TFU_READAHEAD_SIZE, so allocating the reported requirements of
a resource of exactly maxMemoryAllocationSize failed with
VK_ERROR_OUT_OF_DEVICE_MEMORY.

Accept up to one extra page over the limit: since the allocation size
is page-aligned, that covers any sub-page padding.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42179>
2026-06-15 15:15:10 +00:00
Samuel Pitoiset
0c3a45c202 radv: create one winsys for each logical device
This prevents holding open file descriptors after physical devices
are enumerated. This also prevents potential (and unknown) multithreading
issues with the winsys being shared between more than one logical device.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41824>
2026-06-15 14:52:50 +00:00
Samuel Pitoiset
b7cd4d718c radv: duplicate the fd used for syncobj with KHR_display
This is required to move the winsys to logical devices.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41824>
2026-06-15 14:52:49 +00:00
Samuel Pitoiset
47e818c18e radv: query heap info without using the winsys
The winsys will be moved to logical devices. This creates a
ac_drm_device on-demand to make the call faster because otherwise it's
too slow for a function that can be called every frame.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41824>
2026-06-15 14:52:49 +00:00
Samuel Pitoiset
9bbc72f3de radv/amdgpu: add a function to query heap info
To remove the winsys dependency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41824>
2026-06-15 14:52:49 +00:00
Samuel Pitoiset
37dca71612 radv: allow to query GPU info without creating a winsys
This will be very useful for creating one winsys per logical device.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41824>
2026-06-15 14:52:49 +00:00
Samuel Pitoiset
56e96f5bff radv: prevent closing the render node fd twice for AMD_FORCE_VPIPE=1
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41824>
2026-06-15 14:52:48 +00:00
Simon Perretta
e83641907a pvr, pco: advertise support for VK_EXT_subgroup_size_control
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:39 +00:00
Simon Perretta
cb9170b7df pvr: advertise VK_KHR_shader_subgroup_uniform_control_flow
Also adds dEQP-VK.reconvergence.subgroup_uniform_control_flow_ballot.compute.nesting4.7.10
to CI skips due to it having a runtime of > 5m with the following:

Test case 'dEQP-VK.reconvergence.subgroup_uniform_control_flow_ballot.compute.nesting4.7.10'..
  NotSupported (No compatible memory type found at vkMemUtil.cpp:652)

which hits the timeout.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:39 +00:00
Simon Perretta
af15a76551 pvr, pco: add support for VK_KHR_shader_subgroup_rotate
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:39 +00:00
Simon Perretta
8e7666275b pvr: advertise subgroup shuffle and shuffle relative features
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:38 +00:00
Simon Perretta
6d2dd0aff8 pco: add support for subgroup shuffle ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:38 +00:00
Simon Perretta
0796d6da35 pvr: advertise subgroup arithmetic and clustered features
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:38 +00:00
Simon Perretta
e0b795548a pco: add support for reduce/scan ops with cluster awareness
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:38 +00:00
Simon Perretta
913fb8544e pvr: advertise VK_EXT_shader_subgroup_vote and vote feature
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:37 +00:00
Simon Perretta
ce62f5619c pco: add support for subgroup vote_{all,any} ops
- Split pseudo-instruction legalization into pre/post RA stages.
- Add vote pseudo-op and lowering.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:37 +00:00
Simon Perretta
a1f1971252 pco: commonize execution mask counter ref helper function
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:37 +00:00
Simon Perretta
a9dc17324f pco: add br.skip_next op
Allows for the next instruction to be (conditionally) skipped.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:37 +00:00
Simon Perretta
009af15ae2 pvr: advertise VK_EXT_shader_subgroup_ballot and ballot feature
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:36 +00:00
Simon Perretta
30f5f398e5 pco: add subgroup ballot support via shared memory
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:36 +00:00
Simon Perretta
b76e479351 pco: add support for read_invocation via shared memory
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:36 +00:00
Simon Perretta
c84a8d24b9 pco: handle mov offset special regs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:35 +00:00
Simon Perretta
36ba6abd41 pvr, pco: add "real" basic subgroup support
Replaces the no-op subgroup implementation with a real one, covering
what's needed for VK_SUBGROUP_FEATURE_BASIC_BIT.

The setl instruction will only execute on the first valid instance within
a slot/thread-group (comprising 32 instances/threads, i.e. our subgroup size),
which enables a subgroupElect() implementation.

Instances within a slot execute in lockstep which allows us to continue
discarding subgroup barriers as per the no-op implementation.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:35 +00:00
Simon Perretta
49c66a5c44 pco: add mappings for setl, savl ops
Ops to set/read the link register.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41833>
2026-06-15 13:29:35 +00:00
Frank Binns
9ff341ff5f pvr/ci: add AXE-1-16M nightly Vulkan CTS testing
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
There are 12 TI AM62 Starter Kit boards available in the farm for this testing.

Signed-off-by: Robert Mazur <robert.mazur@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42172>
2026-06-15 12:37:39 +00:00
Samuel Pitoiset
f094b9cdde radv/ci: update the list of expected failures for NAVI10
They fail instead of crashing now, not sure what changed though.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42190>
2026-06-15 12:21:25 +00:00
Samuel Pitoiset
4b7b76f01c radv/ci: add more flakes for RAPHAEL
They sometimes appear during a stress test.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42190>
2026-06-15 12:21:25 +00:00
Sergi Blanch Torne
c6da8d6a4d Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 7c018be258.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42244>
2026-06-15 11:54:17 +00:00
Samuel Pitoiset
9cf08a325c nir,aco: use nir_jump_abort instead of nir_jump_halt for abort
This is semantically the same for RADV/ACO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42162>
2026-06-15 11:22:22 +00:00
Samuel Pitoiset
a7287af23f nir: add a new nir_jump_abort
Some backends need to emit different code between nir_jump_halt and
nir_jump_abort.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42162>
2026-06-15 11:22:21 +00:00
Samuel Pitoiset
b811e7adda nir/print: add a missing UNREACHABLE for unknown jump instructions
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42162>
2026-06-15 11:22:21 +00:00
Rhys Perry
4fe2ddf5e2 radv/bvh: use atomic load/store in update_gfx12.comp
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It looks like these are used to synchronize access to args.bounds, but
they were not atomic.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 2d48b2cb47 ("radv: Use subgroup OPs for BVH updates on GFX12")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15641
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42214>
2026-06-15 11:02:19 +00:00
Rhys Perry
a116cc91cd aco: don't increase barrier exec scope to subgroup
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 49fb361c0a ("aco: don't emit workgroup-scope p_barrier for single-wave workgroups")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42214>
2026-06-15 11:02:19 +00:00
Radu Costas
06e44ded39 pco: Try allocating with optimal temp registers
Enable getting and using the optimal number of temps instead of the maximum.
Instead of going straight to the maximum amount and then spilling,
register allocation will now first try to allocate with the optimal
amount of temps, then try with the maximum, then spill.

Signed-off-by: Radu Costas <radu.costas@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42078>
2026-06-15 10:42:19 +00:00
Radu Costas
12dbdaf275 pco: Move RA context handling to state-based
Too many boolean variables handling what is essentially the same state
of the register allocation cause unnecessary complexity. Moved to an
enum and a single struct member in the ra_ctx.

Signed-off-by: Radu Costas <radu.costas@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42078>
2026-06-15 10:42:19 +00:00
Radu Costas
0e76bb5000 pco: Add debug variables for RA
Adds force spilling control and optimal allocation disabling debug variables.

Signed-off-by: Radu Costas <radu.costas@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42078>
2026-06-15 10:42:19 +00:00