Commit graph

73407 commits

Author SHA1 Message Date
Lorenzo Rossi
39f54ddea2 panvk,panfrost: Pass inputs and info to postprocess
This is needed if we want postprocess to decide IDVS and layout later in
the series

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40924>
2026-04-30 18:26:12 +00:00
Lorenzo Rossi
cf6ce1bb8c panfrost: Constant-fold io locations after lowering
This makes panfrost IO lowering similar to panvk and avoids subtle
bugs later in the series.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40924>
2026-04-30 18:26:11 +00:00
David Rosca
3d16845e9a frontends/va: Add missing NULL check for additional output surface
Fixes: efc6d27fd4 ("frontends/va: Add support for decode/encode processing")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41024>
2026-04-30 16:19:20 +00:00
David Rosca
d3dc812eb1 frontends/va: Fix dereference before NULL check in postproc
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41024>
2026-04-30 16:19:20 +00:00
David Rosca
69db546936 frontends/va: Fix setting output color properties from color standard
Fixes: 6e8a8d8ee7 ("frontends/va: Stop using vpp colors standard")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41024>
2026-04-30 16:19:20 +00:00
Samuel Pitoiset
f2ce2868c5 ci: uprev vkd3d
This contains new tests for DGC+multiview which are valid in DX12
but invalid in Vulkan, unless RADV allows support for it. Important
to have coverage for us because it's used for Crimson Desert.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41193>
2026-04-30 15:00:02 +00:00
Jose Maria Casanova Crespo
c3ba5effe2 v3d/v3dv: Use new V3D_MAX_CSD_WG_SIZE = 256
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41257>
2026-04-30 13:59:18 +00:00
Eric R. Smith
8d1fba686b panfrost: add some sanity checks
`__builtin_ctz` is not well defined for `0`, so provide a default value
of `0` for this case. The other sensible choice would be `64`, but that
does not fit in the 5 bit `divisor_r` field (which is how I noticed this,
we were triggering a run time assert in a debug build).

We should skip `launch_draw` if there are no vertices to draw.
This avoids a crash in some indirect rendering tests on Bifrost.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41117>
2026-04-30 12:39:18 +00:00
Pohsiang (John) Hsu
41965d4082 mediafoundation: code clean up
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41279>
2026-04-30 11:51:33 +00:00
Pohsiang (John) Hsu
ff1c171bae mediafoundation: periodic clang-format
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41279>
2026-04-30 11:51:33 +00:00
Marek Olšák
7c69f31ecc radeonsi/ci/build: also fetch video decode/encode sample for VK CTS
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41171>
2026-04-30 00:39:20 +00:00
Marek Olšák
97597d3696 radeonsi/ci: remove the fixed XFB test from fails/flakes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41171>
2026-04-30 00:39:20 +00:00
Rohit Athavale
c5b184a02a mediafoundation: Test compile steps v/s step , and set build flag
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15244
Backport-to: *

Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41221>
2026-04-29 19:59:50 +00:00
Emma Anholt
06ebe40ca1 tu: Set HALF_PRECISION on blits to R11G11B10.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes many new image_to_image tests copying to this format as of CTS
1.4.5.3.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41231>
2026-04-29 18:58:45 +00:00
Karol Herbst
528ceeb49b rusticl: link the C++ runtime statically
Apparently some applications don't have their C++ situation under control.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14090
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41037>
2026-04-29 16:55:39 +00:00
Danylo Piliaiev
5fcde4d65d freedreno: Fix CP_CCHE_INVALIDATE not being applied at the right point
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Apparently CP_CCHE_INVALIDATE is just a plain register write underneath,
so it needs WFI before it, in order to invalidate at the right point.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41266>
2026-04-29 16:25:16 +00:00
Rhys Perry
5ee0935861 ac: move has_cs_regalloc_hang_bug to ac_compiler_info
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41022>
2026-04-29 08:10:08 +00:00
Rhys Perry
e40457b136 ac: move lds_size_per_workgroup to ac_compiler_info
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41022>
2026-04-29 08:10:08 +00:00
Peyton Lee
9b06b0f219 radeonsi/vpe: add VPE 2.0 support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add YUV semi-planar format and YUV packed format support.
Add multi-layer blending support.
Add 3DLut fast loading support.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41190>
2026-04-29 07:46:28 +00:00
Mike Blumenkrantz
2336149c90 lavapipe: KHR_device_address_commands
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/40571>
2026-04-28 19:09:03 +00:00
Valentine Burley
7f6cd7f9aa tu: Fix D16 depth clear rounding mismatch in sysmem mode
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Different HW units (R2D blit engine, 3D pipeline, etc.) apply subtly
different F32->UNORM16 rounding to the same float clear value, causing
cleared pixels to fail subsequent depth comparisons.

Pre-quantize D16 clear values to exact UNORM16 precision before passing
to any HW path. The GMEM path is unaffected as it already converts to
integer in pack_blit_event_clear_value().

Fixes dEQP-EGL.functional.image.modify.renderbuffer_depth16_renderbuffer_clear_depth
with zink and ANGLE when sysmem is used.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41196>
2026-04-28 13:56:36 +00:00
Samuel Pitoiset
df3de4acbb ac,radv,radeonsi: replace mesh_fast_launch_2 by gfx_level checks
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41204>
2026-04-28 06:50:43 +00:00
Timothy Arceri
a42c55da46 amd/radeonsi: dont clamp packed user varyings
ac_nir_optimize_outputs() might pack user varyings into the color
built-ins. If this happens we skip adding clamping to the
components that contain the user varying.

This change also fixes a second bug where a color built-in can be
packed into a non-color slot and was no longer being clamped.

Fixes: 3777a5d7 ("radeonsi: assign param export indices before compilation")
Closes: #14443

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40594>
2026-04-27 22:59:58 +00:00
Marek Olšák
0684976de8 ac/nir: add ac_nir_assign_fs_input_locations to set PS input locations in stone
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
No intended functional change.

This prevents possible breakage due to DCE removing input loads followed
by nir_shader_gather_info updating input masks and changing the result of
ac_nir_get_io_driver_location after PS input register contents are already
determined.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41175>
2026-04-27 21:05:53 +00:00
Benjamin Cheng
922d04c9a5 ac/vcn: Rename VCN5 swizzle mode to GFX12
The original naming is inaccurate, it depends on the GFX version, not
VCN.

Signed-off-by: Suresh Guttula <suresh.guttula@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41202>
2026-04-27 17:13:18 +00:00
Yiwei Zhang
0f2a42afcf lvp/android: use common ANB implementations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This has been unblocked by
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40211.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41138>
2026-04-27 14:58:18 +00:00
David Rosca
7b5277ce5c frontends/va: Fix out of bounds write in AV1 decode tile info
For invalid streams tile cols and rows may be higher than 64.
This would overwrite data after the height_in_sbs array, but since
the maximum amount of bytes overwritten is bound by the maximum
supported decode resolution, this can't overwrite any important
fields and thus won't cause any observable issue.
As this can only happen with invalid streams, it still won't decode
correctly with this fixed.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15290
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41016>
2026-04-27 14:29:34 +00:00
David Rosca
c2a4fa33b8 frontends/va: Fix finding LTRs from POCs in HEVC decode
This should only consider valid entries, not loop over the entire array.
In addition the array size was wrong before.

Fixes: 779edc0759 ("frontends/va: Correctly derive HEVC StCurrBefore, StCurrAfter and LtCurr")
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41016>
2026-04-27 14:29:34 +00:00
David Rosca
630a4d2249 radeonsi: Always use 2D tiling for video dpb
Fixes decode on VCN5 with AMD_DEBUG=notiling

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41201>
2026-04-27 14:10:11 +00:00
Pavel Ondračka
cc7be8433a r300: dirty VS state when switching variants
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When r300_pick_vertex_shader switches to a WPOS variant, it only dirtied
rs_block_state, leaving vs_state with a stale code size. This caused
cs_count warnings (offset of -4 for one extra VS instruction) but was
mostly harmless since the emitted packet stream still used the current
shader.

Factor the VS code dirtying out of r300_bind_vs_state into a helper and
call it when selecting a new variant too.

Fixes: 806dcf9db7 ("r300: only output wpos in vertex shaders when needed")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41200>
2026-04-27 12:48:34 +00:00
Jesse Natalie
3f35e65253 wgl: Use an hwnd xor hdc for framebuffers
It seems maybe hdcs can get recycled?

Fixes: 28058221 ("wgl: Support contexts created from non-window DCs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41174>
2026-04-27 12:26:54 +00:00
Pavel Ondračka
416da54cce r300: fix MSAA resolve COLORPITCH tiling after pipe_surface de-pointerization
r300_simple_msaa_resolve used to patch srcsurf->pitch with the resolve
destination's tiling bits before passing the surface to the blitter.
That worked when set_framebuffer_state kept the same pipe_surface
pointer, so r300_get_nonnull_cb returned the patched object.

After the de-pointerization, r300_framebuffer_init creates a fresh
r300_surface from the pipe_surface template, discarding the pitch
modification. The hardware then uses the MSAA source tiling for
R300_RB3D_COLORPITCH0, leading to corruption.

Move the tiling override into r300_emit_fb_state and override the tiling
bits of COLORPITCH from the destination surface at emit time.

Fixes: 2eb45daa9c ("gallium: de-pointerize pipe_surface")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15303
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41092>
2026-04-27 12:05:44 +00:00
squidbus
a41f0e62bb asahi,nir: Move asahi dynamic clipz pass to common.
Acked-by: Alyssa Rosenzweig <alyssa@rosenz.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41088>
2026-04-27 11:00:59 +00:00
Marek Olšák
bfb6c41b64 amd: remove unnecessary and transitive #includes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reported by clang tools.
See: https://clangd.llvm.org/guides/include-cleaner

struct ac_cmdbuf had to be moved to ac_cmdbuf_base.h because we can't
include ac_cmdbuf.h->sid.h->amdgfxregs.h in radeon_winsys.h for r300.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41091>
2026-04-24 21:53:07 +00:00
Rob Clark
71e76f3637 freedreno: Remove use of fd_perfcntr_type/result_type
Everything is "UINT64, AVERAGE", so no need to get this from the table.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40522>
2026-04-24 21:28:30 +00:00
Emma Anholt
ed729bf948 ci/llvmpipe: Disable some traces too close to the timeout.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I did my stress testing mostly outside of north america work hours, but it
turns out once the runners have 60-70% background CPU usage, these ones
intermittently time out.

Reported-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41163>
2026-04-24 18:06:48 +00:00
Silvio Vilerino
e4c9d57ddf d3d12: Flush stale video encode wait registrations when reusing ID3D12Fence objects
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41160>
2026-04-24 16:52:14 +00:00
Silvio Vilerino
fb13c044a8 Revert "d3d12: Video sliced encode: Use same ID3D12Fence/different per slice values as optimization"
This reverts commit b83a931cb1 as it causes
regressions with dirty rects enabled on some HW platforms that signal
out of order completion and require individual fence objects per slice

Fixes: b83a931cb1 ("d3d12: Video sliced encode: Use same ID3D12Fence/different per slice values as optimization")

Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41160>
2026-04-24 16:52:14 +00:00
Derek Lesho
ce45069c49 zink: Guard bo map/unmap on map_count.
Otherwise zink_bo_map can return cpu_ptr being destroyed by zink_bo_unmap.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41127>
2026-04-24 13:44:50 +00:00
Pavel Ondračka
caeaa6bad2 i915/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41149>
2026-04-24 10:39:50 +00:00
Pavel Ondračka
1ca70a7d6c r300/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41149>
2026-04-24 10:39:50 +00:00
Rob Herring (Arm)
4e8e4ca2fc ethosu: Add minimum and maximum operators
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:16 +00:00
Rob Herring (Arm)
03e29e2fa5 teflon: Add minimum and maximum operations
Add the plumbing for minimum and maximum operations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:16 +00:00
Rob Herring (Arm)
dce4b0313a ethosu: Add reshape operation
A reshape operation just changes the dimensions of a tensor, but doesn't
change the data at all. So we just point the OFM to the IFM data and
we're done.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:16 +00:00
Rob Herring (Arm)
08d93a60f5 ethosu: Add quantize operation
The quantize operation lowers to a pooling nop operation.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:15 +00:00
Rob Herring (Arm)
e6f4f6aa5d teflon: Add quantize operation
Add the plumbing for quantize operations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:15 +00:00
Rob Herring (Arm)
2fe1301e5e ethosu: Add LeakyRelu operation
Add support for LeakyRelu operations. These are implemented as a pooling
LUT.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:15 +00:00
Rob Herring (Arm)
15bc152185 teflon: Add LeakyRelu operation
Add the plumbing for LeakyRelu operations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:14 +00:00
Rob Herring (Arm)
3487b15312 ethosu: Add hard swish operation
Hard swish lowers to a pooling operation with a LUT.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:14 +00:00
Rob Herring (Arm)
f2800fe13b teflon: Add hard swish operation
Add the plumbing for hard swish operations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
2026-04-24 09:22:14 +00:00