Commit graph

224348 commits

Author SHA1 Message Date
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
Radu Costas
3add6b10a8 pco: Move preproc_vecs out of loop
To avoid extra unnecessary calls of the function when temp spilling
happens multiple times within a shader func

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
4942cd586c pco: Set register classes for vec refs
Instructions that use a vec as a source were not having their subsequent
vtxin registers taken into account for reuse, just the 1st register in
the vec. Due to how vtxin regs function, reusing them while they are
still live can cause undefined behaviour. This change sets the registers
for all vtxin regs in the vec.

Fixes: 0ea39c63 ("pco: Use vertex input registers in register allocation")
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:18 +00:00
Samuel Pitoiset
c16f372346 ac/gpu_info: only initialize has_desc_resource_level on GFX10+
It's not a thing on < GFX10.

Fixes: 418c4cfa67 ("ac,radeonsi,radv: add has_desc_resource_level var instead of gfx_level check")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42207>
2026-06-15 10:20:17 +00:00
Samuel Pitoiset
e0eae9f0f4 ac/descriptors: fix setting CB_COLOR_ATTRIB3.RESOURCE_LEVEL
This path is also used by GFX1156.

Fixes: 418c4cfa67 ("ac,radeonsi,radv: add has_desc_resource_level var instead of gfx_level check")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42207>
2026-06-15 10:20:17 +00:00
Han, Mike
53b5d09c1f amd/vpelib: Add missing argb variant support
add argb variant support

Acked-by: Peyton Lee <peytolee@amd.com>
Signed-off-by: Mike Han <SzuChih.Han@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42033>
2026-06-15 10:02:27 +00:00
Zhao, Jiali
30513b0af3 amd/vpelib: fix HDR external monitor video black content
Always update the uid_3dlut to reflect its latest status, to avoid mis-programming.

Acked-by: Peyton Lee <peytolee@amd.com>
Signed-off-by: Jiali Zhao <Jiali.Zhao@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42033>
2026-06-15 10:02:26 +00:00
Rouf, Farhan
e9371bd710 amd/vpelib: Refactoring Reset Pipes Function
[WHY]
Refactoring reset pipe function to prevent future command buffer bloat.

[HOW]
Split the reset pipes function into RMCM detachment and backend register
reset. Created a pipe setup function that calls MPC reset followed by 3dlut fastload and
backend register reset to the end of program frontend.

Acked-by: Peyton Lee <peytolee@amd.com>
Signed-off-by: Farhan Rouf <Farhan.Rouf@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42033>
2026-06-15 10:02:26 +00:00
Lin, Ricky
af0d88ba46 amd/vpelib: DPM detect first frame action
Add FW new-context message for first-frame DPM detection

Acked-by: Peyton Lee <peytolee@amd.com>
Signed-off-by: Ricky Lin <rickylin@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42033>
2026-06-15 10:02:26 +00:00
Leder, Brendan Steve (Brendan)
6cafe0e248 radeonsi/vpe: Update DCC API and programming
[WHY]
Want to support Display DCC for input + Centralized DCC for output

[HOW]
Updated DCC API to only include needed params, and updated plane writer
to support DCC.

Acked-by: Peyton Lee <peytolee@amd.com>
Signed-off-by: Brendan Steve Leder <BrendanSteve.Leder@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42033>
2026-06-15 10:02:26 +00:00
Assadian, Navid
e64b5b24df amd/vpelib: FP16 non linear handling
[WHY]
FP16 with non-linear gamma is not a regular format. But to support
multi-pass with FP16 intermediate format, the support needs to be added.

Acked-by: Peyton Lee <peytolee@amd.com>
Signed-off-by: Navid Assadian <Navid.Assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42033>
2026-06-15 10:02:26 +00:00
Peyton Lee
bbf7875153 amd/vpelib: Replace hardcoded bg format table size with sizeof
Replace hardcoded bg format table size with sizeof

Acked-by: Peyton Lee <peytolee@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42033>
2026-06-15 10:02:26 +00:00
Peyton Lee
b874a6baf2 amd/vpelib: Fix Color Corruption AV1 Issue
[WHY]
Color corruption observed when playing a rotated HDR AV1 Video on an SDR
monitor. The cause of the corruption was erroneously repeated 3dlut
fastload configs throught a single vpe descriptor.

[HOW]

- The handling of the state of the config writer call back in
  conjunction with missing the completion of the fastload config
  resulted in the fastload being cached in both the frame programmming
  and stream op config when it should be cached in neither.
  The sequence was set stream/op sharing = 0, create 3dlut fastload
  config, set stream/op config cache to 1, change the config type which
  triggers a config completion and caches the config due to the
  stream/op confi cache being set to 1.

Acked-by: Peyton Lee <peytolee@amd.com>
Signed-off-by: Jesse Agate <Jesse.Agate@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42033>
2026-06-15 10:02:26 +00:00
Peyton Lee
96fc9cdfd5 amd/vpelib: refine coding style
refine coding style

Acked-by: Peyton Lee <peytolee@amd.com>
Signed-off-by: Mike Han <SzuChih.Han@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42033>
2026-06-15 10:02:26 +00:00
Han, Mike
c171124a34 amd/vpelib: add format support check
add format support check for new format support check

Acked-by: Peyton Lee <peytolee@amd.com>
Signed-off-by: Mike Han <SzuChih.Han@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42033>
2026-06-15 10:02:26 +00:00