Commit graph

71548 commits

Author SHA1 Message Date
Tomeu Vizoso
2581c3ab60 ethos: Initial commit of a driver for the Arm Ethos-U65 NPU.
Supports all models in the test suite. No optimizations implemented yet.

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:15 +00:00
Tomeu Vizoso
b3262b37ce teflon: Add support for the ResizeNearestNeighbor operation
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:15 +00:00
Tomeu Vizoso
0001dab219 teflon: Add support for the StridedSlice operation
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:14 +00:00
Tomeu Vizoso
83b9eb038f teflon: Add support for the MaxPool operation
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:13 +00:00
Tomeu Vizoso
48983c3198 teflon/tests: Replace YOLOX model with that from TI
The one we are testing currently with doesn't have a properly maintained
upstream repository nor demo.

Use the model from TI's zoo so we benefit from their maintenance:

https://github.com/TexasInstruments/edgeai-yolox

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:13 +00:00
Ruijing Dong
6e1988e3ed radeonsi/vcn: Correct a typo condition for jpeg decoding
Checking dec->jctx[i] instead of sctx->ctx

Cc: mesa-stable

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37875>
2025-10-15 19:04:19 +00:00
Timur Kristóf
765a748840 radeonsi: Don't use compute queue with regalloc hang bug
It already didn't use compute queues on GFX6, but some GFX7
chips are also affected by the same bug.

Compute queues may run compute dispatches in parallel with
the graphics queue, even from other processes/apps.
At the moment we don't have a way to restrict all workgroups
to 256 invocations, so instead let's make sure not to use the
compute queue.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37885>
2025-10-15 18:08:49 +00:00
Mike Blumenkrantz
db9dbcbec0 zink: defer swapchain updates for interval changes if acquired image is active
in the case where an app triggers a swap interval change mid-frame, this handling
previously triggered an immediate swapchain retire and then presented the new swapchain
which had yet to be rendered to

instead, defer swapchain updates to immediately after present when things are
safe to ensure that the right image is always presented

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14104

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37894>
2025-10-15 12:29:05 -04:00
Gert Wollny
673351bbf3 r600: Fix comparison of strides array when emitting vertex buffers
The comparison was only comparing a number of bytes where we actually
have to compare a number of dwords (Thanks QuadShader for digging into this)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14067
Fixes: 659b7eb279 ("r600: better tracking for vertex buffer emission")

v2: use element size instead of type size (Vitaly)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37856>
2025-10-15 15:25:04 +00:00
Daniel Schürmann
b2c44e3a65 amd: change radeon_info::lds_size_per_workgroup for GFX10+ to 64KB
Even though in WGP-mode, there is a total of 128KB LDS, a single workgroup
can access at most 64KB.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37577>
2025-10-15 11:20:09 +00:00
Daniel Schürmann
eecd1c020d amd: keep ac_shader_config::lds_size unaligned
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37577>
2025-10-15 11:20:09 +00:00
Daniel Schürmann
f99eba729d amd/common: remove radeon_info::lds_alloc_granularity and radeon_info::lds_encode_granularity
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37577>
2025-10-15 11:20:08 +00:00
Daniel Schürmann
6fd5766620 amd: add and use utility functions for LDS size encoding
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37577>
2025-10-15 11:20:08 +00:00
Daniel Schürmann
d49dd4d024 radeonsi: pass calculated LDS size to ACO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37577>
2025-10-15 11:20:07 +00:00
Daniel Schürmann
b651234414 amd: change ac_shader_config::lds_size to bytes
We still keep it aligned to allocation granularity.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37577>
2025-10-15 11:20:07 +00:00
Pierre-Eric Pelloux-Prayer
f367de85dd radeonsi/tests: add a flag to specify a folder with the cts binaries
Useful for out of tree builds.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36463>
2025-10-15 08:27:11 +00:00
Pierre-Eric Pelloux-Prayer
93518e5d62 radeonsi/tests: add an argument to specify a folder with the must pass files
It's useful when running the various test from an out of tree build.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36463>
2025-10-15 08:27:11 +00:00
Pierre-Eric Pelloux-Prayer
d453045b87 radeonsi/tests: rename glcts_path -> vk_gl_cts_path
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36463>
2025-10-15 08:27:10 +00:00
Pierre-Eric Pelloux-Prayer
522d19966a radeonsi/tests: rename --no-xxx arguments
Use --xxx instead as it makes it easier to control
enablement/disablement of each suite.
vkcts is disabled by default.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36463>
2025-10-15 08:27:10 +00:00
Pierre-Eric Pelloux-Prayer
6af562d0df radeonsi/tests: add gfx11_5 to the list
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36463>
2025-10-15 08:27:09 +00:00
Pierre-Eric Pelloux-Prayer
67c6f80a54 radeonsi/tests: allow to test radv
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36463>
2025-10-15 08:27:09 +00:00
Pierre-Eric Pelloux-Prayer
ce97b6cd6f radeonsi/tests: use black to fix style issues
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36463>
2025-10-15 08:27:08 +00:00
Samuel Pitoiset
88f53906d8 amd,radv,radeonsi: add ac_emit_cp_pfp_sync_me()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37813>
2025-10-15 07:35:25 +00:00
Samuel Pitoiset
7ead034a06 amd,radv,radeonsi: add ac_emit_cp_copy_data()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37813>
2025-10-15 07:35:25 +00:00
Samuel Pitoiset
0e358cec52 amd,radv,radeonsi: add ac_emit_cp_release_mem_pws()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37813>
2025-10-15 07:35:24 +00:00
Samuel Pitoiset
c45035ceb4 amd,radv,radeonsi: add ac_emit_cp_acquire_mem_pws()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37813>
2025-10-15 07:35:23 +00:00
Samuel Pitoiset
6329e282b8 amd,radv,radeonsi: add ac_emit_cp_wait_mem()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37813>
2025-10-15 07:35:23 +00:00
David Rosca
3e458d06b8 radeonsi/vcn: Support BT2020 matrix with EFC
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
8b194cb0ac pipe: Remove pipe_video_vpp_color_standard_type
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
f59e0971b5 pipe: Remove PIPE_VIDEO_CAP_VPP_SUPPORT_HDR_INPUT/OUTPUT
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
a337a97429 gallium/vl: Remove vl_compositor_set_csc_matrix
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
a46aeff216 gallium/vl: Remove luma key support
This was only used for VDPAU.

Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
69717c257f vl,frontends/va: Implement gamma and primaries conversion
This enables basic HDR support.

Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
5bc0df5aad vl,frontends/va: Implement YUV->YUV matrix coeff conversion
Use separate matrix for YUV->RGB and RGB->YUV conversions.

Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
6e8a8d8ee7 frontends/va: Stop using vpp colors standard
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
acc4041302 radeonsi/vpe: Stop using vpp colors standard
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
99d6e5c078 radeonsi/vcn: Stop using vpp colors standard
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
27a3911460 frontends/va: Always advertise explicit color standard support
This has nothing to do with HDR support.

Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
40df7363b9 gallium/vl: Remove vl_csc_get_matrix
Not used anymore.

Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
9393a0510b frontends/va: Use new RGB YUV conversion matrix
This adds support for SMPTE240M, BT2020 and RGB->YUV conversion for
all color standards and color ranges.

Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
a284bff8ad frontends/va: Set color properties when not using explicit color standard
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
David Rosca
228b2ac2a3 gallium/vl: Add new function to get RGB YUV conversion matrix
This supports Identity, BT601, BT709, BT2020, SMPTE240M and color range
conversions in both directions.

Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
2025-10-15 06:06:44 +00:00
Mike Blumenkrantz
da2647f14e zink: enable srgb-mutable for dmabufs when possible
this should "just work"

...except on intel

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37873>
2025-10-14 23:33:00 +00:00
Mike Blumenkrantz
9d0e73335a zink: enable GL_EXT_mesh_shader
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37788>
2025-10-14 23:14:17 +00:00
Pierre-Eric Pelloux-Prayer
f7725299c3 tc: add debug code for tc_set_vertex_elements_for_call_pending
To make sure the issue fixed by the previous commit isn't reintrodued.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37763>
2025-10-14 22:01:10 +00:00
Pierre-Eric Pelloux-Prayer
9296478a15 tc: prevent flush of incomplete batches
tc_reserve_set_vertex_elements_and_buffers_call slots data are only valid
after the call to tc_set_vertex_elements_for_call.

If a batch flush occurs between these 2 calls, random memory will be read
leading to crashes.

The only user of tc_reserve_set_vertex_elements_and_buffers_call being
st_update_array_templ, we can determine that only 2 tc_buffer_unmap calls
can be inserted, so we reserve slots for them.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37763>
2025-10-14 22:01:10 +00:00
Rob Hughes
b79013ead9 llvmpipe: Work around WSL 1 missing support for memfd_create()
WSL version 1 has a known limitation that the kernel does not support
the memfd_create() syscall, and it always returns -1 (see
https://github.com/microsoft/WSL/issues/3542). This results in
lavapipe/llvmpipe failing to create the anonymous file it needs for
allocations from the pipe_screen object, which in turn results in
results in failed application calls to Vulkan APIs (in the case I
observed, vkMapMemory returned an invalid (0xffffffff) pointer along
with VK_SUCCESS, leading to the application segfaulting).

This issue can be reproduced by simply running `vkcube` (or, presumably
any other simple Vulkan application) inside WSL 1, e.g.:

xvfb-run -s '-screen 0 1024x768x24' vkcube --c 300

This patch addresses the issue with several changes:

1. llvmpipe_create_screen() now checks for errors from the
   os_create_anonymous_file function and errors out early, making it
   easier to track down issues similar to this. Previously, the invalid
   fd of -1 would be stored in the pipe_screen struct and the problems
   would only appear later.
2. os_create_anonymous_file() now attempts to handle the case where
   memfd_create() fails, by falling back to creating a file in a
   temporary directory. This fallback is the same as is already done for
   builds that don't have memfd_create available at build time - note
   that the difference here is that this is a _runtime_ fallback, as is
   needed for the case of WSL 1.
3. The fallback logic previously relied on the XDG_RUNTIME_DIR
   environment variable, which might not be set when running inside WSL
   because there is unlikely to be a desktop environment configured.
   This patch adds a fallback of creating a new directory inside /tmp in
   this case.

Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37679>
2025-10-14 17:40:12 +00:00
Daniel Schürmann
d0b87a0d5f ac/nir_flag_smem_for_loads: call divergence analysis internally
Also don't flag more SMEM instructions (in ACO) after the last
call to ac_nir_lower_mem_access_bit_sizes().

Totals from 75 (0.09% of 79839) affected shaders: (Navi48)

Instrs: 191246 -> 189960 (-0.67%)
CodeSize: 996840 -> 985976 (-1.09%)
Latency: 3066184 -> 2945500 (-3.94%)
InvThroughput: 355373 -> 353106 (-0.64%); split: -0.66%, +0.02%
SClause: 4848 -> 4699 (-3.07%)
Copies: 13827 -> 13925 (+0.71%); split: -0.07%, +0.78%
Branches: 5176 -> 5003 (-3.34%)
PreSGPRs: 6222 -> 6272 (+0.80%)
VALU: 108934 -> 108993 (+0.05%); split: -0.00%, +0.06%
SALU: 31679 -> 31210 (-1.48%); split: -1.51%, +0.03%
SMEM: 7158 -> 6739 (-5.85%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37843>
2025-10-14 16:33:12 +00:00
Daniel Schürmann
8ff44f17ef amd/lower_mem_access_bit_sizes: also use SMEM for subdword loads
We can simply extract from the loaded dwords as per
nir_lower_mem_access_bit_sizes() lowering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37843>
2025-10-14 16:33:11 +00:00
Erik Faye-Lund
c2f6c74c1c gallium/aux: unconditionally write buffer
There's no reason to compare the pointer before writing it here any
more. All that does, is make us trigger an unnessecary Valgrind error
with a branch based on an undefined value if the passed pointer wasn't
properly initialized here.

Fixes: b3133e250e ("gallium: add pipe_context::resource_release to eliminate buffer refcounting")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37842>
2025-10-14 12:05:27 +00:00