Commit graph

214895 commits

Author SHA1 Message Date
Erik Faye-Lund
c3170d11ac pvr: limit availability of HW defs
To be able to support multiple GPU architectures, we need to thread
carefully with HW defs. So let's limit the availability of the HW defs
to where it's needed. We do this by moving the HW def includes and
helpers to query them to end of the source-files.

In the long run, we probably want something a bit more formal to get
access to HW-dependent values based on the hw-info. But there's some
work in progress to change how that works, so let's kick the can down
the road a bit on that part.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:31 +00:00
Erik Faye-Lund
b8721b7436 pvr: respect has_pbe_stride_align_1pixel
This makes us either use the rogue-define, or a single pixel. This
feature isn't available in any HW we support yet, but that is going to
change soon.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:31 +00:00
Erik Faye-Lund
ba47e03908 pvr: store has_pbe_stride_align_1pixel in pvr_device_features
This doesn't actually need fixing; there's no Rogue HW with this
feature. Instead, let's start populating this when we fill in new
architectures, which does support this.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:31 +00:00
Erik Faye-Lund
da414f102c pvr: factor out write_immutable_samplers
This is the only part of pvr_descriptor_set_create() that actually
depends on architecture specific details (in particular, the
write_sampler calls), so let's factor this out to a separate function.

This is going to be helpful when we're doing multi-arch support.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:31 +00:00
Erik Faye-Lund
afff4be21c pvr: encapsulate clear-state
Same story as the previous commit; this let's us store an architecture
specific structure inside an architecture agnostic structure.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:31 +00:00
Erik Faye-Lund
ddd604439f pvr: encapsulate border-table
The border-table is architecture specific, but it's stored in the device
structure that isn't. We need to store a pointer to it instead, because
the size will vary from architecture to architecture.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:30 +00:00
Erik Faye-Lund
8233f77caa pvr: split idep_pco_uscgen_programs_h in two
When we do multiarch, we want to be able to refer to the headers
separately from the sources here, so let's split this dependency in two.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:30 +00:00
Ashish Chauhan
8df205d520 pvr: store arch in device-info
Right now all supported devices are Rogue devices. But in the future,
we're going to support multiple architectures. So let's add a way to
query this at run-time.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:30 +00:00
leonperianu
1e548195d2 pvr: feature promotion to core from derived
RGX_FEATURE_USC_ITR_PARALLEL_INSTANCES is no longer a derived feature
for Volcanic, it is a core feature. This improvement is related to the
introduction of Volcanic device information.

Signed-off-by: leonperianu <leon.perianu@imgtec.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:30 +00:00
leonperianu
bf1d9d1339 pvr: Change has_fbcdc_algorithm to 1-bit bit-field
This aligns it with the definitions of other device features.

Signed-off-by: leonperianu <leon.perianu@imgtec.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:30 +00:00
Patrick Lerda
f8de09a811 r600: fix rv770 read scratch compatibility
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The flag mega_fetch should be set on rv770 for a
read scratch operation (as written in the r700
documentation p357). Without this flag, read scratch
does not work and a gpu hang could be triggered.

Here are the tests fixed:
shaders/glsl-predication-on-large-array: fail pass
spec/glsl-1.10/execution/temp-array-indexing/glsl-fs-giant-temp-array: fail pass
spec/glsl-1.10/execution/temp-array-indexing/glsl-vs-giant-temp-array: fail pass
spec/glsl-1.30/execution/fs-large-local-array: fail pass
spec/glsl-1.30/execution/fs-large-local-array-vec2: fail pass
spec/glsl-1.30/execution/fs-large-local-array-vec3: fail pass
spec/glsl-1.30/execution/fs-large-local-array-vec4: fail pass
spec/glsl-1.30/execution/fs-multiple-large-local-arrays: fail pass

Fixes: 9c48a139b0 ("r600g: Support emitting scratch ops")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38353>
2025-11-17 15:48:17 +00:00
Erik Faye-Lund
d77279fa9b panfrost: remove stale code
This code was no longer needed after switching to os_read_file, but I
accidentally left it around, whoops!

Fixes: 49183bfb79 ("pan/bi: use os_read_file-helper")
CID: 1665295
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
2025-11-17 15:26:22 +00:00
Erik Faye-Lund
c8e30c7a9f panvk: assert that shader_present isn't zero
If it is, util_last_bit() will return zero, and the subtraction that
follows will underflow. Make it obvious that this can't happen, by
adding an assert here.

CID: 1665297
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
2025-11-17 15:26:22 +00:00
Erik Faye-Lund
22d929f265 panvk: do not open-code debug_get_num_option
Open-coding the size-parsing here is fragile. Let's use a common helper
for this instead.

CID: 1665346
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
2025-11-17 15:26:22 +00:00
Erik Faye-Lund
37a7a157e8 pan/kmod: fix priority query logic
The PANFROST_JM_CTX_PRIORITY values aren't bitmasks, but enum values.
But the kernel interface uses the BIT()-macro on them, so we need to do
the same. We don't have the macro, but it's trivial to do this with a
bitshift instead.

Fixes: f04dbf0bc0 ("pan/kmod: query and cache available context priorities from KMD")
CID: 1666511
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
2025-11-17 15:26:22 +00:00
Erik Faye-Lund
55ef52d009 panfrost: remove needless variable
We can already tell if we're writing the first variable by looking at
sig_offset. So let's drop the needless variable here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
2025-11-17 15:26:22 +00:00
Erik Faye-Lund
9839db709a panfrost: initialize sig before use
If only invalid surfaces are passed, we end up using an undefined array
as a string. And while this might not be possible, it is hard to reason
about, especially for new readers and tools. So let's initialize the
buffer as an empty string.

CID: 1666581
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
2025-11-17 15:26:22 +00:00
Lionel Landwerlin
8147108590 anv: optimize pipeline switching with secondaries
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38479>
2025-11-17 15:06:55 +00:00
Lionel Landwerlin
85a117bc37 anv: track descriptor mode in SBA tracepoint
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38479>
2025-11-17 15:06:55 +00:00
Gert Wollny
942e6af40b r600/sfn: use PS and PV inline registers when possible
This reduces register pressure later.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:57 +00:00
Gert Wollny
80887e2590 r600/sfn: Fix test creation and handling of 3-src without dest
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:57 +00:00
Gert Wollny
1f58a36abb r600/sfn: Add method to force-override the dest of an AluInstr
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:57 +00:00
Gert Wollny
6f8841b338 r600/sfn: Make value factory a member of the block scheduler
No need to pass it around all the time.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:56 +00:00
Gert Wollny
8e0a0ca098 r600/sfn: Add slot access operator to AluGroup
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:56 +00:00
Gert Wollny
12d913fe4f r600/sfn: change register ID of dummy dest register
Handle it correctly in the assembler, live range evaluation
and RA.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:56 +00:00
Gert Wollny
fc5728950b r600/sfn: don't use dummy register with non-write 64 bit slots
For trans ops and two source ops we can just clear the write flag

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:56 +00:00
Gert Wollny
603af345be r600/sfn: fix querying number of sources for LDS ops in readport validation
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:55 +00:00
Gert Wollny
0cd0efbbf9 r600/sfn: Don't assign dest registers in non-write interpolation slots
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:55 +00:00
Gert Wollny
ebe395608a r600/sfn: Silence warning about unused parameter
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:55 +00:00
Gert Wollny
43df08dd42 r600/sfn: remove some unused static variables
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:54 +00:00
Gert Wollny
a22c03f0a3 r600: Handle dummy dest in assembler and disass
The dummy dest will not be allocated, so we must not
count it.

In the disassambler write PV and PS if the ALU dest GPR is
only used via PS/PV.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:54 +00:00
Tapani Pälli
1a4b4dba9a anv: remove own GetRenderingAreaGranularityKHR
As it does the same as common version provided by runtime.

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/38474>
2025-11-17 14:23:20 +00:00
Valentine Burley
eb0c95a5d5 lavapipe/ci: Run vkd3d job in parallel
This appears to be stable now, and running on multiple threads fixes the
the timeout problems we were hitting in lavapipe-vkd3d.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38476>
2025-11-17 14:00:10 +00:00
Calder Young
d6fbbfef5c brw: fix SIMD lowering of fp16 sampler message data with multiple components
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 61d6aea4 ("brw: fix SIMD lowering of sampler messages with fp16 data")
Closes: mesa/mesa#13149
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38455>
2025-11-17 12:38:14 +00:00
Lionel Landwerlin
c12fa4bf8b vulkan/runtime: fix incorrect assert on empty shader groups
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e05a9b77b6 ("vulkan/runtime: split rt shaders hashing from compile")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14278
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38466>
2025-11-17 12:12:22 +00:00
David Rosca
3abb2707e2 radv/video: Fix coding used_by_curr_pic_lt_flag
Fixes: d68a1fc0d4 ("radv/video: port hevc slice header encoding from radeonsi")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14301
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38475>
2025-11-17 11:51:08 +00:00
Samuel Pitoiset
8d4ba81ca8 radv: remove now unused SDMA helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38448>
2025-11-17 11:29:24 +00:00
Samuel Pitoiset
a4e4f13c78 ac,radv: add ac_emit_sdma_copy_t2t_sub_window()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38448>
2025-11-17 11:29:24 +00:00
Samuel Pitoiset
f5ecc5ffd5 ac,radv,radeonsi: add ac_emit_sdma_copy_tiled_sub_window()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38448>
2025-11-17 11:29:24 +00:00
Samuel Pitoiset
5f8fa6ae03 ac,radv,radeonsi: add ac_emit_sdma_copy_linear_sub_window()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38448>
2025-11-17 11:29:23 +00:00
Christoph Pillmayer
da3d8c8b4b nir: Update progress info in nir_sort_unstructured_blocks
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38354>
2025-11-17 10:30:37 +00:00
Christoph Pillmayer
8db66767a9 nir: Fix preseved metadata in sort_unstructured_blocks
Fixes: c859ea5783 ("nir: Add a sort_unstructured_blocks() helper")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38354>
2025-11-17 10:30:37 +00:00
David Rosca
3858a6a696 radv/video: Fix coding allow_screen_content_tools and force_integer_mv
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This was copied from radeonsi which expected seq_force_screen_content_tools = 2
and seq_force_integer_mv = 2.

Fixes: 37e71a5cb2 ("radv/video: add support for AV1 encoding")
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38371>
2025-11-17 08:43:54 +00:00
David Rosca
22803f0d50 vulkan/video: Fix coding AV1 seq_choose_screen_content_tools = 1
Fixes: 724655bfc6 ("vulkan/video: add support for AV1 encoding to runtime")
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38371>
2025-11-17 08:43:54 +00:00
Collabora's Gfx CI Team
c319cb627f Uprev ANGLE to 127a84404b88dbc4327ffb7f831a9a36c3b111bc
e9626fbced...127a84404b

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38102>
2025-11-17 08:07:36 +00:00
Samuel Pitoiset
9666bd1245 radv: remove unnecessary handling of SDMA in radv_cs_emit_write_event_eop()
This function is only called for GFX or ACE. SDMA uses are already
handled before.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38430>
2025-11-17 08:28:38 +01:00
Samuel Pitoiset
6413651bcf ac,radv,radeonsi: add ac_emit_sdma_copy_linear()
RadeonSI wasn't considering the undocumented HW limitation apparently.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38430>
2025-11-17 08:28:37 +01:00
Samuel Pitoiset
191bf7aba6 ac,radv: add ac_emit_sdma_constant_fill()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38430>
2025-11-17 08:25:32 +01:00
Julia Zhang
0007644913 amdgpu/virtio: unmap bo in destroy_host_blob
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Unmap bo in destroy_host_blob when hb->cpu_addr is not NULL.
This avoid memory leak caused by bo refcount is not 0 when
amdvgpu_bo_free is called.

Signed-off-by: Julia Zhang <Julia.Zhang@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38440>
2025-11-17 05:35:31 +00:00
Yiwei Zhang
12edb83fb5 venus: add a wsi image log
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is helpful to tell which path is taken:
1. explicit modifier: legacy_scanout=0, prime_blit=0
2. prime blit: legacy_scanout=0, prime_blit=1
3. legacy scanout: legacy_scanout=1, prime_blit=0

To be noted, venus doesn't advertise legacy scanout support, but we
implicitly support it for gamescope compatibility.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38457>
2025-11-16 15:37:16 +00:00