Commit graph

2442 commits

Author SHA1 Message Date
Osama Abdelkader
0423488955 vulkan/wsi: Fix realloc error handling in wsi_get_modifiers_for_format
Replace assert() with proper error checking for realloc() failure.
If realloc fails, free any existing modifiers, clean up resources,
and return NULL instead of potentially crashing or leaking memory.

Fixes a potential memory leak when memory allocation fails.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39215>
2026-01-29 23:15:37 +00:00
Mel Henning
94fdc54f07 vulkan/wsi: Call wl_display_roundtrip on our queue
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: a8272bf0f1 ("vulkan/wsi/wayland: use roundtrip instead of flush on swapchain free")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14746
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39598>
2026-01-29 10:10:58 +00:00
Michael Cheng
51966cc452 vulkan: add vk_shader_ops::replay_at vfunc stub
Add a new vfunction to support shader capture/replay, needed for RT
pipeline capture/replay.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33022>
2026-01-29 08:46:50 +00:00
Lionel Landwerlin
5758f3f5ea vulkan/pipeline: don't consider capture-replay flag for shader hashing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33022>
2026-01-29 08:46:49 +00:00
Lionel Landwerlin
1112c1461d vulkan/wsi/direct: remove VkDisplay created from GetDrmDisplayEXT on ReleaseDisplayEXT
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39556>
2026-01-29 08:20:12 +00:00
Samuel Pitoiset
d8ef386f98 vulkan: add support for VK_KHR_internally_synchronized_queues
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39489>
2026-01-28 15:32:57 +00:00
Ella Stanforth
abaa4a80ad vulkan/runtime: use nir_shader_tex_pass for ycbcr lowering
Acked-by: Simon Perretta <simon.perretta@imgtec.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:26 +00:00
Ella Stanforth
b4457dd5d0 vulkan: add plane aspect format helper
Acked-by: Simon Perretta <simon.perretta@imgtec.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:25 +00:00
Caleb Callaway
a91a636faf driconf: LTO disable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39544>
2026-01-27 14:57:20 +00:00
Hans-Kristian Arntzen
a9e261fa14 wsi/common: Allow timestampValidBits < 64 for present timing.
In this case, do the wrapping logic on our end and normalize right away
to host time domain.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:53 +00:00
Hans-Kristian Arntzen
5e2814c8a4 wsi/display: Implement present timing on KHR_display.
Deal with VRR vs FRR as well.

Loosely based on earlier work by Keith Packard and Emma Anholt
(MR 38472 for reference).

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:53 +00:00
Emma Anholt
96bde78fc7 vulkan/wsi: Delete ancient libdrm support for the page flip handler.
Looks like the "new" page flip handler was in 2.4.78 in 2017.  Mesa
requires at least 2.4.109, so we can retire this.

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:53 +00:00
Emma Anholt
e61975c112 wsi/display: Delete dead vblank_handler path.
We use sequence_handler for our vblank events.

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:52 +00:00
Emma Anholt
bdaf2b0b2c vulkan/wsi: Add some comments about how the vblank/flip sequencing happens.
Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:52 +00:00
Hans-Kristian Arntzen
612d8dde81 wsi/wayland: Fix some locking quirks around present ID update.
Don't drop the lock only to retake it right after.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:51 +00:00
Hans-Kristian Arntzen
bf9cd1546f vulkan/wsi: Implement QUEUE_OPERATIONS_END present timing query.
This is mostly provided for convenience, but it's not implementable by
applications when we're using blit queues for PRIME, so it's quite useful
to have.

This is reworked from previous GOOGLE_display_timing
MRs by Keith Packard and Emma Anholt.
See MR 38472 for reference.

Rather than exposing PRESENT_STAGE_LOCAL, we expose all timestamps in
one unified domain to simplify the implementation.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:51 +00:00
Hans-Kristian Arntzen
3fdc14b089 wsi/wayland: Implement EXT_present_timing on Wayland.
Only weakness right now is that we cannot implement VRR vs FRR query reliably.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:51 +00:00
Hans-Kristian Arntzen
9f32fc6d3c vulkan/wsi: Add no-op present timing support to most backends.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:50 +00:00
Hans-Kristian Arntzen
c7b70b2e2e vulkan/runtime: Expose PRESENT_STAGE_LOCAL as calibrateable domain.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:50 +00:00
Hans-Kristian Arntzen
47d69664d8 vulkan/wsi: Add common infrastructure for EXT_present_timing.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:50 +00:00
Dave Airlie
2db1a624e3 lavapipe: add NV_cooperative_matrix2 reductions support
This adds support for the coopmat2 reductions

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38964>
2026-01-26 22:39:40 +00:00
Konstantin Seurer
20322687e0 vulkan: Avoid NAN in the IR BVH
Build and encoding stages should be able to assume that AABBs don't have
NANs. This commit covers all possible sources of NAN.

Fixes: 091b43b ("radv: Use HPLOC for TLAS builds")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14696
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39508>
2026-01-26 22:14:31 +00:00
Konstantin Seurer
0817551f00 vulkan: Handle inactive primitives with LBVH builds
cc: mesa-stable

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39378>
2026-01-26 21:49:17 +00:00
Emma Anholt
870e233ca5 vulkan/wsi/display: Avoid holding drm master for the device's fd.
We get a display fd passed in to us through wsi_display_init_wsi(), and
when that was the first open of the display device with no previous DRM
master, it got master privs and we saved that as the display fd to use for
KHR_display.  However, that meant that no other client can get DRM master,
preventing things like vkAcquireDRMDisplayEXT() users from getting a
master fd to pass in to us.

Instead, we can drop master at device init time, and pick it back up when
a VK_KHR_display swapchain is created that uses that fd.

This allows dEQP-VK.wsi.acquire_drm and dEQP-VK.wsi.direct_drm CTS tests
to run, which was previously impossible (those tests try to create a
custom VK instance, while the CTS already has an instance that had been
created with KHR_display enabled, so they're not the first open of the
fd).  It also means that you could successfully implement VT switching
between a KHR_display client and other userspace DRM clients.  Also, we
can finally implement the text about vkAcquireDRMDisplayEXT's drmFd
needing to match the device's fd.

The risk of this change, though, is if you're implementing a compositor,
and your clients have a chance to open the DRM fd before you've created
your swapchain, they may inadvertently have master and DOS you.  However,
this is no different than the previous situation, where someone with
permissions to open DRM could hold master and DOS you already.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38502>
2026-01-26 19:42:33 +00:00
Emma Anholt
fa72be80d9 wsi/display: Fix up the swapchain init error paths.
Lots of unwinding was broken, and the CTS caught some of it once I fixed
CTS testing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38502>
2026-01-26 19:42:33 +00:00
Emma Anholt
1a172efa20 vulkan/wsi/display: Add some super useful debug messaging.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38502>
2026-01-26 19:42:33 +00:00
Emma Anholt
f8831ccb2d vulkan/wsi/display: Rename XCB RandR functions to mention "randr"
Otherwise, it can be unclear when reading this code what part is talking
to X11 and what is talking to the kernel.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38502>
2026-01-26 19:42:32 +00:00
Wei Zhao
a8272bf0f1 vulkan/wsi/wayland: use roundtrip instead of flush on swapchain free
Use wl_display_roundtrip() instead of wl_display_flush() when freeing
a swapchain to ensure the compositor has processed buffer release
events before continuing.

wl_display_flush() only sends pending requests without waiting for
the compositor to process them. When rapidly creating and destroying
large swapchain buffers, buffer references may not be released quickly
enough (e.g., during CTS testing), causing memory to accumulate.

Using wl_display_roundtrip() ensures synchronization with the
compositor, allowing buffers to be released promptly.

Signed-off-by: Wei Zhao <Wei.Zhao@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39475>
2026-01-26 06:27:37 +00:00
Christian Gmeiner
44e695ea90 vulkan/runtime: Add VK_EXT_blend_operation_advanced state tracking
Implement state management for VK_EXT_blend_operation_advanced. Add
MESA_VK_DYNAMIC_CB_BLEND_ADVANCED dynamic state and parse
VkPipelineColorBlendAdvancedStateCreateInfoEXT during pipeline creation.
The parsed state is propagated to per-attachment fields for
src_premultiplied, dst_premultiplied, blend_overlap, and clamp_results.

Implement vk_common_CmdSetColorBlendAdvancedEXT for dynamic state
updates. When the extension info is not provided, set Vulkan spec
defaults of srcPremultiplied=true, dstPremultiplied=true, and
blendOverlap=UNCORRELATED.

Per Vulkan spec, attachmentCount is ignored when COLOR_BLEND_ENABLE,
COLOR_BLEND_EQUATION, COLOR_WRITE_MASK, and COLOR_BLEND_ADVANCED are
all dynamic. When advancedBlendCoherentOperations is not enabled, mark
COLOR_BLEND_ADVANCED as dynamic upfront in vk_get_dynamic_graphics_states()
so downstream code only needs to check the dynamic bit.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:01 +00:00
Christian Gmeiner
5eebc9c13f vulkan/runtime: Add helper to convert VkBlendOverlapEXT to pipe_blend_overlap_mode
Add vk_blend_overlay_to_pipe() to translate Vulkan's
blend overlap (VK_BLEND_OVERLAP_*_EXT) to the corresponding
pipe_blend_overlap_mode enum values.

This will be used by drivers implementing VK_EXT_blend_operation_advanced
to convert Vulkan state to driver-internal representation.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:01 +00:00
Christian Gmeiner
93c05bab12 vulkan/runtime: Add helper to convert VkBlendOp to pipe_advanced_blend_mode
Add vk_advanced_blend_op_to_pipe() to translate Vulkan's
advanced blend operations (VK_BLEND_OP_*_EXT) to the corresponding
pipe_advanced_blend_mode enum values.

This will be used by drivers implementing VK_EXT_blend_operation_advanced
to convert Vulkan state to driver-internal representation.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:01 +00:00
Samuel Pitoiset
b30f780c4f vulkan: update spec to 1.4.340
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39476>
2026-01-23 16:07:30 +00:00
Samuel Pitoiset
873008f274 vulkan: fix missing begin debug marker for HPLOC
This fixes capturing with RGP.

Fixes: 091b43b970 ("radv: Use HPLOC for TLAS builds")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39427>
2026-01-22 08:32:18 +01:00
Yiwei Zhang
c031bbd4b6 vulkan/wsi: improve present wait enablement tracking
Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39322>
2026-01-20 19:13:33 +00:00
Yiwei Zhang
669503e404 vulkan/wsi: rename khr_present_wait to has_present_wait
Trivial refactor to aligns with surrounding codes and avoid confusions.

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39322>
2026-01-20 19:13:33 +00:00
Yiwei Zhang
b986250b69 vulkan/wsi: fix present wait support and present id creation condition
Common wsi should only create that semaphore if present wait is enabled.
Drivers may only advertise KHR_present_wait2 w/o KHR_present_wait. So
the common wsi core has to check for both.

Fixes: bf285c3be9 ("vulkan/wsi: Add basic support for PresentWait2")
Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39322>
2026-01-20 19:13:33 +00:00
Yiwei Zhang
be9caf8ed6 vulkan/wsi: avoid host stage when blit to foreign queue
For mitigating the below VVL violation:

> VUID-vkCmdPipelineBarrier-srcStageMask-09634
>
> vkCmdPipelineBarrier(): dstStageMask is VK_PIPELINE_STAGE_HOST_BIT
> but srcQueueFamilyIndex (0) != dstQueueFamilyIndex (4294967293).
>
> The Vulkan spec states: If either srcStageMask or dstStageMask
> includes VK_PIPELINE_STAGE_HOST_BIT, for any element of
> pBufferMemoryBarriers, srcQueueFamilyIndex and dstQueueFamilyIndex
> must be equal

Fixes: 153857fb64 ("vulkan/wsi: amend barriers for blit dst buffer going to foreign queue")
Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39322>
2026-01-20 19:13:32 +00:00
Icenowy Zheng
734b6a8c35 vk: descriptors: sort bindings along with flags
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Vulkan spec requires binding flags to be matched with the binding with
the same index, however currently bindings are sorted with flags not
properly sorted, which leads to bindings and flags mismatch.

Resolve this by adding optional flags info to the parameters of
vk_create_sorted_bindings(), and refactoring panvk/pvr (which really
pair bindings and flags instead of only iterating flags) to use sorted
flags.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38967>
2026-01-20 15:55:47 +00:00
Konstantin Seurer
a6a62363df vulkan: Implement HPLOC
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39116>
2026-01-18 19:20:36 +01:00
llyyr
c3763b12e2 vulkan/wsi/headless: implement vkReleaseSwapchainImagesKHR for headless
We need to support this if we advertise KHR_swapchain_maintenance1

Cc: mesa-stable
Signed-off-by: llyyr <llyyr.public@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39218>
2026-01-17 06:21:32 +00:00
llyyr
a1dd7eec87 vulkan/wsi/headless: add stub for VkSurfacePresentScalingCapabilitiesKHR
Similar to last MR, since we advertise support for
KHR_swapchain_maintenance1, we need to advertise this

Cc: mesa-stable
Signed-off-by: llyyr <llyyr.public@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39218>
2026-01-17 06:21:32 +00:00
llyyr
9cd5a4849a vulkan/wsi/headless: populate VkSurfacePresentModeCompatibilityKHR
Previously, we ignored this struct which caused VVL to treat the
compatible mode list as NULL, causing false positive validation errors
on headless applications.

Closes: #14622

Cc: mesa-stable
Signed-off-by: llyyr <llyyr.public@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39218>
2026-01-17 06:21:32 +00:00
Alyssa Rosenzweig
5b44724ad2 vk/meta_copy_fill_update: simplify tex builder
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39271>
2026-01-14 08:18:15 +00:00
Alyssa Rosenzweig
41cdc548ee nir/builder: infer txf_ms/txl/txb opcodes
I'm not convinced these really should be separate opcodes at all in NIR, but
that's not what this patch is about. Here we just infer the opcodes in the
texture builder to allow simplified usage.

This lets us drop nir_txl() & nir_txb() helpers in favour of nir_tex(.lod/bias)
which is more normalized. We could also drop nir_txf_ms in favour of nir_txf but
that affects more callsites and is not obviously a win (unlike nir_txl which is
used once and nir_txb which is unused).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39271>
2026-01-14 08:18:15 +00:00
Konstantin Seurer
077292f65b radv/bvh: Use box16 nodes when bvh8 is not used
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Using box16 nodes trades bvh quality for memory bandwidth which seems to
be roughly equal in performance.

Stats assuming box16 nodes are as expensive as box32 nodes:
Totals from 7668 (79.68% of 9624) affected BVHs:
compacted_size: 951666944 -> 742347648 (-22.00%)
max_depth: 57606 -> 57615 (+0.02%)
sah: 129114796242 -> 129998517775 (+0.68%); split: -0.00%, +0.68%
scene_sah: 188564162 -> 192063633 (+1.86%); split: -0.02%, +1.88%
box16_node_count: 0 -> 3270600 (+inf%)
box32_node_count: 3365707 -> 95100 (-97.17%)

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37883>
2026-01-10 11:36:28 +01:00
Eric Engestrom
93390d4b73 vk/runtime,zink: only integrate renderdoc on supported platforms
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It is not actually available to all the platforms mesa can be compiled
to, so let's keep an opt-in list of supported platforms instead, and
compile it out on all other platforms.

Fixes: 48a0478126 ("zink: add renderdoc handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39176>
2026-01-07 09:08:46 +00:00
Marek Olšák
492a176cbb util: increase SHA1_DIGEST_LENGTH to 32 (BLAKE3_KEY_LEN)
The last 12 bytes are always 0 for now. With this, all SHA1 functions
can be internally implemented as BLAKE3, so that we can switch everything
to BLAKE3 by only changing the implementation of the sha1 utility.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Dave Airlie
833706e381 device-select: add a layer setting to disable device selection logic
There are cases like zink where we have a file descriptors we are searching
for devices for, so we don't need device selecting reordering, we just want
the fastest path to get the devices so we can match them.

This also helps avoid some cases of deadlock inside compositors where
zink/vulkan initialises later and tries to connect to the compositor.

This uses a VK_EXT_layer_setting to add a bypass setting.

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38252>
2026-01-05 23:51:26 +00:00
Icenowy Zheng
e8c81652c9 vulkan/wsi/headless: do not destroy images that are never created
Currently the image creation failure handling codepath of
wsi_headless_surface_create_swapchain() just calls
wsi_headless_swapchain_destroy() , which will try to destroy all
`image_count` of images. However, some of these images might never be
successfully created because of the failure, which leads to double-free.

Set image_count to the number of successfully created images before
calling wsi_headless_swapchin_destroy() to prevent over-destroying.

Fixes dEQP-VK.wsi.headless.swapchain.simulate_oom.* on lavapipe and pvr,
although some of the tests got QualityWarning saying "Creating swapchain
did not succeed, callback limit exceeded" on lavapipe (Pass on pvr).

Cc: mesa-stable
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39039>
2026-01-05 19:05:06 +00:00
Franz Hoeltermann
0b86e1f752 device-select: Avoid usage of legacy GetPhysicalDeviceProperties
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This caused validation errors and redundantly called both the new "2"
variant and the legacy variant

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39058>
2026-01-01 17:51:35 +00:00