Tested with:
commit 3a252ff9d8b6dc22b20463bfcb31a4e8992b0e8f
Merge: 9800bf6fae3b 11895f375939
Author: Simona Vetter <simona.vetter@ffwll.ch>
Date: Fri Jul 11 11:25:34 2025 +0200
Note that the kernel treats WCL similar to PTL, so 94de1dfd4729
("drm/xe/ptl: Drop force_probe requirement") also removed the
force_probe for WCL.
Backport-to: 25.1
Ref: 3c0f211bc8fc ("drm/xe: Add Wildcat Lake device IDs to PTL list")
Ref: 94de1dfd4729 ("drm/xe/ptl: Drop force_probe requirement")
Ref: drm/drm-next 3a252ff9d8b6dc22b20463bfcb31a4e8992b0e8f
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36148>
(cherry picked from commit bca1acbb42)
It's helping buggy applications that may use the returned
value without checking for an error first.
For instance, viewperf20/maya uses a sequence like this:
glGenBuffers(n = 1, buffers = &3458)
...
glGetNamedBufferParameteriv(3458, GL_BUFFER_SIZE, &p)
Since 3458 isn't associated to an object yet, _mesa_lookup_bufferobj_err
will return NULL, leaving 'p' with its original value.
It seems to randomly trigger an exit from the benchmark,
presumably because the content in 'p' is random (for instance
-1879044180).
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36190>
(cherry picked from commit d21c8e1bed)
We were missing parenthesis on pan_cast_and_pack macros causing various
issues.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 410e5a36ec ("pan/genxml: Rework gen_pack.py to support OpenCL")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36261>
(cherry picked from commit 455b93601a)
NULL was forgotten.
This issue was detected by the gcc sanitizer.
==30873==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7f94f9ad14b0 at pc 0x7f94f04905bc bp 0x7ffe3b1ebcf0 sp 0x7ffe3b1ebce8
READ of size 8 at 0x7f94f9ad14b0 thread T0
#0 0x7f94f04905bb in loader_bind_extensions ../src/loader/loader.c:783
#1 0x7f94ee656232 in setupLoaderExtensions ../src/gallium/frontends/dri/dri_util.c:88
#2 0x7f94ee656232 in driCreateNewScreen3 ../src/gallium/frontends/dri/dri_util.c:111
#3 0x7f94f98d9a14 in dri2_create_screen ../src/egl/drivers/dri2/egl_dri2.c:774
#4 0x7f94f98dfbea in surfaceless_probe_device ../src/egl/drivers/dri2/platform_surfaceless.c:298
#5 0x7f94f98dfbea in dri2_initialize_surfaceless ../src/egl/drivers/dri2/platform_surfaceless.c:390
#6 0x7f94f98dbc4f in dri2_initialize ../src/egl/drivers/dri2/egl_dri2.c:861
#7 0x7f94f98dbc4f in dri2_initialize ../src/egl/drivers/dri2/egl_dri2.c:832
#8 0x7f94f9892843 in eglInitialize ../src/egl/main/eglapi.c:696
Fixes: 56ed5cf1bb ("dri: Get rid of __DRIbackgroundCallableExtension")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36255>
(cherry picked from commit 92dc71dd41)
Specifically, fe8bc3f23e made the "default" case `manual`
instead of `never`, which is causing all staging pipelines to have that
job regardless of any file `changes`, and always `manual` making it
block pipelines.
Let's make it automatic for upstream pipelines (ie. staging and
push-to-main), and only run on file `changes`.
Fixes: fe8bc3f23e ("ci: Only run rustfmt when necessary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36260>
(cherry picked from commit f065c2f0ac)
The GL driver expects special sync handling when a buffer is newly
exported, and also requires that bo->prime_fd be set so the batch code
can use it later. Add a function to do this for the KMS export case,
which otherwise would not need a PRIME fd.
agx_bo_export() then becomes a simple dup of bo->prime_fd (which is
probably marginally faster than redoing drmPrimeHandleToFD() anyway).
The thread safety story here is that as long as we do all this the first
time a BO is exported (in any way), there is no way for another thread
to have gotten ahold of the BO already, so no need for extra locking.
This does not affect hk, since it doesn't rely on bo->prime_fd for
anything. It also doesn't affect the timestamp BO and other special
cases.
Fixes: 067d820c9d ("asahi: Mark KMS exported resource BOs as shared")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13563
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36241>
(cherry picked from commit 140c625bda)
VkDeviceMemory is always 64-bit, and %p on 32-bit is, well, 32-bit,
breaking the build.
There doesn't seem to be a good way to printf a Vulkan handle
cross-platform-ly, and it's unlikely to actually be useful,
so just don't print it at all.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36231>
(cherry picked from commit 0dc9108f7a)
We were missing a couple bits from hash and a bunch of stuff from the
comparison. This puts most of nir_tex_instr into a single pack_tex
helper that's used by both and grabs everything we were missing.
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36234>
(cherry picked from commit 557ac588e4)
var_nodes size is x4 of nir defs count, since we need to track a node
for each individual channel of a register write. We don't need that for
SSA, but we used non-shifted indices for SSA, which made the compiler
reliant of reg nir def indeces to start after all the SSA indices.
That has changed with 7b70b419b528("nir: always index SSA defs before
printing").
Fix that by shifting SSA index as well, that would allow not to rely on
any assumptions on nir def indices.
Backport-to: 25.2
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36206>
(cherry picked from commit 2e38cbc40c)
In VCN5, the AV1 context buffer has changed to a bigger
one than VCN4. It fixed an AV1 decoding issue on VCN5.
Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36208>
(cherry picked from commit 32a2012975)
Per spec VUID-VkMemoryAllocateInfo-pNext-01874:
If the parameters do not define an import operation, and the pNext chain
includes a VkExportMemoryAllocateInfo structure with
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
included in its handleTypes member, and the pNext chain includes a
VkMemoryDedicatedAllocateInfo structure with image not equal to
VK_NULL_HANDLE, then allocationSize must be 0
- before: total 116, skip 66, pass 36, fail 14
- after: total 116, skip 66, pass 50, fail 0
Fixes: cebb2bf266 ("lavapipe: Add AHB extension")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36204>
(cherry picked from commit 209e402720)
The implementation only takes the ownership after a successful import.
On import failure, the caller is going to handle the fd. Meanwhile,
amend a missing error code on an error path.
Fixes: 895d3399f7 ("lavapipe: add support for KHR_external_memory_fd")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36204>
(cherry picked from commit 160cd3a317)
lvp hasn't used common device memory obj, and it allocates and imports
ahb on its own. Thus it has to implement the AHB export api itself.
- before: total 116, skip 66, pass 24, fail 26
- after: total 116, skip 66, pass 36, fail 14
Fixes: cebb2bf266 ("lavapipe: Add AHB extension")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36204>
(cherry picked from commit f1af533b2c)
Currently tile swizzle can only be non zero for single plane
formats, for multi plane formats we always set PIPE_BIND_SHARED.
Luma only (Y400) JPG decode and encode with RGB input surface (EFC)
are the only two cases where we can get surface with tile swizzle
and ignoring it would result in corrupted output.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13346
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35647>
(cherry picked from commit b665bd21cb)
While the API spec does describe which flags _may_ be passed in, the
overall CL working group agreement is, that implementations should expect
random flags to be passed in as other implementations _may_ use them to
further restrict or allow image formats.
Also fix validation for importing GL objects while at it.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36216>
(cherry picked from commit d8793e3874)
Otherwise we can have a case where binning VS uses more consts than
full VS (when safe variant is used for full VS), that will result in
a rendering issue because SP_VS_CONST_CONFIG.CONSTLEN is shared between
full and binning VS in PROGRAM_CONFIG state and gets the value from the
full VS.
There are two alternative solutions that can allow binning VS to always
use maximum constlen:
- Move constlen emission to per-XS config. This interferes
PROGRAM_CONFIG state which uploads consts and does SP_UPDATE_CNTL.
Consts would need to be uploaded after constlen is defined, while
SP_UPDATE_CNTL must be done before per-XS state is emitted.
Also having SP_UPDATE_CNTL in a draw state that is always DIRTY
isn't great.
Something didn't work out on A6XX, so this idea was dropped.
- Emit constlen again in VS_BINNING draw state. This seem to work
but also likely an undefined behaviour since constlen is changed
after some consts are uploaded.
Cc: mesa-stable
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36203>
(cherry picked from commit 6003a89b89)
We need the job artifacts in all cases to gather performance data.
Since commit b723bc80d2, we were only saving them on failures.
Fixes: b723bc80d2 ("ci/lava: inherit .piglit-traces-test in .lava-piglit-traces and deduplicate configs")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36195>
(cherry picked from commit b7f1f40bf4)
After commit 545727f97c (ci/android: Move ANDROID_CTS_MODULES to build
script, 2025-06-24) the comment about ANDROID_CTS_MODULES in
lvp-android-angle-android-cts-include.txt has become inaccurate.
Update the instructions to reflect the latest status.
Fixes: 545727f97c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36187>
(cherry picked from commit 0f09c9436b)
This is already being set as needed everywhere else, and would cause
issues in future work.
Use the relative `install/` path for `HWCI_TEST_SCRIPT` as that's
supported by both HW runners and FDo runners.
A separate MR will fix the `/install/` vs `install/` mess.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36145>