Commit graph

213916 commits

Author SHA1 Message Date
Benjamin Cheng
e9956932bb radv/video: Fix H264/H265 reference selection
The order of pReferenceSlots is not well-defined by spec. Instead we
need to look at the RefPicList0/1 which provides slot indices.

Cc: mesa-stable
Reviewed-by: David Rosca <david.rosca@amd.com>
(cherry picked from commit ab56ce154b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:55 -08:00
Benjamin Cheng
0997cc6707 radv/video: Fix num_ref_idx_l{0,1} related overrides
Since we only support 1 L0/L1 ref, the default num refs in the PPS
should always be 0. With that there never any need to set the override
flag in the slice header (until more references are supported).
Also the ref pic list modifications should be clamped to the size of the
ref pic list.

This fixes an issue seen with dEQP-VK.video.encode.h264.i_p_b_13_*.

Cc: mesa-stable
Reviewed-by: David Rosca <david.rosca@amd.com>
(cherry picked from commit 2e21eec921)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:54 -08:00
Calder Young
a977cd49d1 intel: Fix calculation of max_scratch_ids on fused devices
The subslice IDs provided by the SR0.0 EU register are not adjusted to account
for fusing, so the upper bound max_scratch_ids can vary from device to device
depending on what specific slices were fused during manufacturing.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
(cherry picked from commit c0d809820f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:54 -08:00
Tapani Pälli
7b0ce4bde3 anv: add furmark workaround layer
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14274
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit ba89826b75)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:53 -08:00
Timothy Arceri
0e019bd754 util/driconf: Add linux version of Penumbra fixes
Cc: mesa-stable
(cherry picked from commit d10036362f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:52 -08:00
Emma Anholt
5693ff3e2a tu: Fix leak of compute shader pipeline->base.executables_mem_ctx;
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14358
(cherry picked from commit 89da258e71)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:52 -08:00
Pierre-Eric Pelloux-Prayer
1430b06e9b mesa: fix function prototype
Replace void* by GLvoid* and add GLAPIENTRY to match the gl_API.xml
version.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14164
Fixes: ae75b59cb5 ("glthread, tc: Fix buffer release with glthread and tc")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 671e943c9b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:51 -08:00
Calder Young
f21dca7139 anv: Fix ray query shadow stack buffer size
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Cc: mesa-stable
(cherry picked from commit 09e8a54087)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:50 -08:00
Ian Romanick
11d5d20e8b brw: Force allow_spilling when spill_all is set
This ensures that g0 is reserved for spilling since there is going to be
spilling.

Fixes: 8bca7e520c ("intel/brw: Only force g0's liveness to be the whole program if spilling")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 1fc2f52d36)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:49 -08:00
David Rosca
c205817236 radeonsi/vcn: Fix maybe uninitialized warning
Backport-to: 25.3
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
(cherry picked from commit 1884b03a10)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:48 -08:00
Natalie Vock
681e8b7e84 radv/rt: Correctly copy culling flags when updating to separate AS
This was missing and led to the field being uninitialized.

Cc: mesa-stable
(cherry picked from commit b7f011e653)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:42 -08:00
Natalie Vock
8e9da72044 radv/rt: Keep updated nodes always active
In updateable AS, we keep all nodes active even if they're
degenerate/NaN, because too many games ignore API rules about not
making inactive nodes active (and some vendor tips outright advise this
behavior). We also need to match this by keeping everything active in
the update side. The ALWAYS_ACTIVE macro has been long removed and
replaced by VK_BVH_BUILD_FLAG, too. Since updating only happens to
updateable AS, don't even check for the flag, just implement the
always-active handling.

Cc: mesa-stable
(cherry picked from commit bc1eea90b9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:41 -08:00
Lionel Landwerlin
142c392389 nir/lower_printf: fix missing singleton add
If we're using the singleton, we need to add to it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 4b9aa9dc91)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:41 -08:00
Lionel Landwerlin
97d5911e00 nir/lower_printf: fix array alignment
The pointer arithmetic doesn't need a 4byte alignment, otherwise
everything is broken.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit d24633023f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:40 -08:00
Lionel Landwerlin
45bd0be006 spirv: fix printf generation
Not having the uses_printf will drop the printf info in serialization.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 67faf6dfbd)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:40 -08:00
Lionel Landwerlin
e1eaedbd99 nir: fix lower_printf with no arguments
SPIRV generated printf with no arguments have an undef source (not the
expected deref).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 6940b8fcd7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:39 -08:00
Valentine Burley
54277ca7e1 egl: Disable kopper on Android
Kopper is not supported on Android, and attempting to use it breaks zink
on the platform.

Disable kopper automatically when running on Android, fixing zink without
`LIBGL_KOPPER_DISABLE`.

Fixes: 3294cad341 ("egl: Rename dri2_detect_swrast() and also detect kopper")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14331
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
(cherry picked from commit 8a1ea724b4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:38 -08:00
Samuel Pitoiset
93d5e37c5b radv: fix per-submit RGP captures on video queues
SQTT user data packets aren't supported either.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit af461de026)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:38 -08:00
Faith Ekstrand
7882a413fb vulkan/drm-syncobj: Stop returning early waiting for sync files
In the WAIT_ALL case in spin_wait_for_sync_file(), we were returning the
moment we saw the first success.  However, this isn't a wait-all, it's a
bad wait-any.  We should instead just continue on to check the next sync
until we've ensured that every sync in the array has a sync file.  The
only reason this wasn't blowing up in our face is because it only
affects non-timeline drivers (pretty rare these days) and because most
of the places where we use WAIT_PENDING on non-timeline drivers is to
guard a sync file export and those typically have only a single sync in
the array.

Cc: mesa-stable
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
(cherry picked from commit e4e619d685)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:37 -08:00
Tapani Pälli
e6c814c448 drirc: set intel_disable_threaded_context for Amnesia The Bunker
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14084
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 21f646d196)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:37 -08:00
Tapani Pälli
1f1f0d5ad6 drirc/iris: add drirc to disable threaded context
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 4daabf76b4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:36 -08:00
Rob Clark
bbbee1f85d freedreno: Fix internal VBO reference leak
It appears that this extra ref is no longer needed.  And not dropped
anywhere.

Fixes: b3133e250e ("gallium: add pipe_context::resource_release to eliminate buffer refcounting")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14315
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
(cherry picked from commit cccdbbc360)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:36 -08:00
Ian Forbes
e32d0815af svga: Check if Stencil buffer is NULL
Fixes a nullptr dereference on older HW versions.

Fixes: f29d939824 ("svga: rework framebuffer state")
Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
(cherry picked from commit 4e16a5b68b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:35 -08:00
Patrick Lerda
6599a0ea57 r600: fix error filters compatibility
The shader-db functionality was interfering with the error
filters.

Two new options are added: R600_DEBUG=shaderdb and
R600_DEBUG=precompile. The option precompile is added
to maintain the compatibility with the shader-db repository.

This change fixes 22 of these tests:
deqp-gles31/functional/debug/error_filters/case_.*: warn pass
deqp-gles31/functional/debug/error_groups/case_.*: warn pass

Fixes: 28d6a5af25 ("r600: Add shader precompile and shader-db support.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
(cherry picked from commit f005c0b5ad)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:34 -08:00
Hyunjun Ko
33abe4a45e vulkan/video: Fix H.265 long-term reference handling
Without these fixes, H.265 streams using long-term references would
fail to decode correctly as the decoder wouldn't distinguish between
short-term and long-term reference frames.

Fixes: 896f95a37e ("vulkan/video: fix h265 decoding with LT enabled.")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 01de6ac134)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:34 -08:00
Eric Engestrom
3cdda99e9a ci: use $CI_TRON_JOB_PRIORITY tag on all ci-tron jobs
Moving `ci-tron:priority:` out of the variable because an empty value
will not be authorized, and this makes it obvious if that bug ever
happens (job will not be picked up and gitlab will complain that
`ci-tron:priority:` is not a tag registered by any runner), instead of
getting picked up by any runner that will then reject (fail) the job.

(This is caused by GitLab's API not allowing tags to be enforced when
picking up jobs, resulting in jobs with missing tags being picked up by
any runner, like the bug we had with the generic fd.o runners a few
months ago.)

v2 (Martin Roukala):
 * use the priority tags in all amdgpu jobs
 * add missing tags in etnaviv jobs
 * add missing tags in broadcom jobs

Cc: mesa-stable
(cherry picked from commit 53fe1f39a0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:33 -08:00
Lionel Landwerlin
c9a52df804 brw: compute final copy propagation resulting source
Fixes this test on Xe2+:

INTEL_DEBUG=no32 ./deqp-vk -n dEQP-VK.spirv_assembly.instruction.maint9_vectorization.bit_field_u_extract.result_v16i-base_v16i-offset_s64u-count_s16i

Generate invalid code for that platform:

and(16)         g37<1>UW        g65<16,4,4>UW   0x000fUW        { align1 1H I@5 };
	ERROR: Invalid register region for source 0.  See special restrictions section.

Several helpers like has_subdword_integer_region_restriction() do not
see the final type of the source, so compute it early.

Maybe new_src could be used in more cases. Being conservative for now.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
(cherry picked from commit 8f9acc0150)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:33 -08:00
Dave Airlie
4988213fe6 dozen: return INCOMPATIBLE_DRIVER on instance create failure
When probing on generic Linux platforms, the loading of d3d12 and
the first init of could fail, but the error returned causes a
loader warning to be printed.

Use the correct error return to stop this.

Cc: mesa-stable
(cherry picked from commit c00b66fa71)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:32 -08:00
Eric Engestrom
0648e0a222 meson: auto-disable draw-use-llvm when llvm=disabled
The option's description is:
> Whether to use LLVM for the Gallium draw module, if LLVM is included.

Let's disable it right away if LLVM is disabled, to avoid some
configurations from failing.

Cc: mesa-stable
(cherry picked from commit 37c7d19e46)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:31 -08:00
Eric Engestrom
fb984d2845 meson: auto-disable amd-use-llvm when llvm=disabled
The option's description is:
> Whether to use LLVM for the AMD drivers, if LLVM is included.

Let's disable it right away if LLVM is disabled, to avoid configurations
like the one in the issue below from failing.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14306
(cherry picked from commit 69bb927ebf)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:30 -08:00
Matt Turner
005d8a870c meson: Let -Ddraw-use-llvm=false work for R300 on non-x86
Prior to commit b8b38d38b1 ("meson: reinstate LLVM requirement for r300
and enforce it for i915 too") it was possible to build and use r300 for
architectures that do not have LLVM (e.g., alpha).

The only SWTCL chips are integrated graphics in x86 systems, and are not
available in discrete cards.

Fixes: b8b38d38b1 ("meson: reinstate LLVM requirement for r300 and enforce it for i915 too")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 4235c39a9a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:29 -08:00
Rob Clark
1e2bf818fa freedreno/a6xx: Fix UB in convert_color()
Swizzle can include PIPE_SWIZZLE_0/_1 (4 and 5) which result in indexing
beyond the channel array.

Reported-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Fixes: 76e350671f ("freedreno/a6xx: Sysmem clear fixes")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
(cherry picked from commit f0465ced7f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:29 -08:00
Dylan Baker
6cd6fc82ed .pick_status.json: Update to 076a383437
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-12-01 09:16:12 -08:00
Dylan Baker
1400d5477a .pick_status.json: Update to bcedc88f21
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:37:39 -08:00
Matt Turner
4eac81ed95 meson: Fix sysprof-capture-4 dependency
The versioning scheme changed in v45.0 (the previous version was
3.48.0). As such, this version check would wrongly accept e.g. 48.0.

Fixes: e9341568fa ("meson: require sysprof-capture-4 >= 4.49.0")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit ad14942300)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:58 -08:00
Yurii Kolesnykov
54828a0b15 loader: Wrap nouveau_zink_predicate with HAVE_LIBDRM
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Fixes: 265afd9bfd ("loader: Don't fall back to nouveau GL without zink")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14290
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
(cherry picked from commit 4913177b14)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:57 -08:00
Pierre-Eric Pelloux-Prayer
3134ebd354 radeonsi/sqtt: clear out sqtt bo on resize
If the resizing fails, we shouldn't use the destroyed bo anymore.

Fixes: 5794a86f19 ("radeonsi/sqtt: support sqtt buffer auto-resizing")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit bac9d17ead)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:55 -08:00
Lionel Landwerlin
72c77df965 anv: Wa_18040903259 only applies to RCS when in GPGPU mode
Sadly this probably won't change anything in terms of perf as the CCS
engine has a bunch of other restrictions.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 243c01c703 ("anv/iris: implement Wa_18040903259")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
(cherry picked from commit 07b7de35cc)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:54 -08:00
Samuel Pitoiset
5885477397 radv: fix RB+ for depth-only with unused attachments
When there are no color outputs in the rendering state, but color write
enable/write aren't masked out (which seems legal with
VK_EXT_dynamic_rendering_unused_attachments), the driver must emit
CB_DISABLE to disable CB rendering completely.

Otherwise, if there is also a depth/stencil attachment in the rendering
state, CB0 is always set to 32_R for RB+. That means, the pixel shader
would still export fragments but to the previously bound color
attachment.

VKCTS is missing coverage.

Fixes: 4580293ab2 ("radv: implement RB+ depth-only rendering for better perf")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14319
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 168a8d0b52)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:53 -08:00
Yonggang Luo
8069763b02 ci/microsoft: Downgrading WinFlexBison.win_flex_bison to version 2.5.24
This is achieved by provide version parameter to winget-cli

Fixes: 9592686ca0 ("ci/windows: Use winget to install packages and install Microsoft.WindowsWDK.10.0.26100")

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

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
(cherry picked from commit 84cce2a739)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:51 -08:00
Mel Henning
5b6d043852 zink: Lock around screen_debug_marker_{begin,end}
vkQueueBeginDebugUtilsLabelEXT and vkQueueEndDebugUtilsLabelEXT
require queue to be externally synchronized, which means these functions
require the lock. Unfortunately, there's no guarantee that the debug
markers will be matched in the multithreaded case, but I suppose this is
better than crashing.

Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 80db8171de)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:50 -08:00
Mel Henning
7c1705c148 zink: Lock queue_lock in zink_destroy_screen
Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 018178842e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:50 -08:00
Mel Henning
3b6f03bd49 zink: Create one queue lock per device
We currently only create one queue per queue family on the device. The
device can be shared between multiple zink_screens, so having one lock
per screen can still lead to multiple locks per queue. Fix this by
allocating queue_lock along with the device.

This fixes an issue that was causing crashes with nvk+zink and
QtWebEngine with QTWEBENGINE_FORCE_USE_GBM=1 This can be reproduced by
resizing the window in either:

 * anki - https://apps.ankiweb.net/ or
 * Qt's simplebrowser example
   https://doc.qt.io/qt-6/qtwebengine-webenginewidgets-simplebrowser-example.html

which would then cause this dmesg error:

    nouveau 0000:01:00.0: anki[92007]: Failed to find syncobj (-> in): handle=40

along with a context loss.
With VK_LOADER_LAYERS_ENABLE=VK_LAYER_KHRONOS_validation we would additionally
get warnings like:

    Validation Error: [ UNASSIGNED-Threading-MultipleThreads-Write ] | MessageID = 0xa05b236e
    vkQueueSubmit(): THREADING ERROR : object of type VkQueue is simultaneously used in current thread 139824449189568 and thread 139823901816512
    Objects: 1
        [0] VkQueue 0x557a666783e0

Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 9acce36652)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:49 -08:00
Mel Henning
81f1cefcea zink: Make screen->queue_lock a pointer
Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit dff1b9d4e9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:49 -08:00
Mel Henning
aaca86cd4d zink: Return zink_device in create_logical_device
Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit f0dc8c0224)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:48 -08:00
Eric R. Smith
052f8bde04 pan: fix a bifrost disassembly assert failure
We were overflowing an array during bifrost disassembly. This was
only a problem if the user explicitly set an environment variable,
so unlikely to occur in casual use, and also only could be triggered
in very specific, dense code. But we still should get this right!

The specific CTS test that caused the assert is:

'dEQP-VK.graphicsfuzz.stable-quicksort-for-loop-with-injection'

with environment variable `BIFROST_MESA_DEBUG=shaders`. One of the
shaders has a clause with 6 constants (the maximum) and this overflowed
the array because we assume we always have an extra slot (used for
modifier processing).

Cc: mesa-stable
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
(cherry picked from commit 65ba14519e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:47 -08:00
Dylan Baker
e0669e19e9 .pick_status.json: Update to 7c193ffef1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-21 14:22:46 -08:00
Lionel Landwerlin
28874a99ad anv: consider 64bit atomics on similar formats with mutable images
vkd3d-proton uses a R32G32_UINT image with MUTABLE

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ed77f67e44 ("anv: add emulated 64bit integer storage support")
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
(cherry picked from commit 73bf51dba0)

Conflicts:
	src/intel/ci/anv-adl-vkd3d-fails.txt

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-19 09:39:00 -08:00
Erik Faye-Lund
798ec2e23f mesa/st: do not enable EXT_texture_buffer_object with rgba only
GL_EXT_texture_buffer_object requires support for alpha, luminance,
luminance-alpha and intensity formats. If we can't support those, we
can't enable the extension.

Fixes: 45ca7798dc ("glsl: handle interactions between EXT_gpu_shader4 and texture extensions")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 6f2b8c3f61)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-19 09:23:59 -08:00
Erik Faye-Lund
5dde2812b9 mesa/main: correct formatquery error-handling
Most of the time, we remember to check for both extensions. But in one
case, it seems we forgot the GLES extension. Whoops.

Let's switch to a helper here, so we don't have to repeat the logic over
and over again.

Fixes: b4c0c514b1 ("mesa: add OES_texture_buffer and EXT_texture_buffer support")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 9d5e0c1ad2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
2025-11-19 09:23:59 -08:00