Yiwei Zhang
f216c109be
venus: add a deep copy helper for VkPresentInfoKHR
...
Below pNext structs are handled:
- VkDeviceGroupPresentInfoKHR
- VkPresentRegionsKHR
- VkPresentIdKHR
- VkPresentId2KHR
- VkSwapchainPresentFenceInfoKHR
- VkSwapchainPresentModeInfoKHR
- VkPresentTimingsInfoEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39283 >
2026-01-13 19:47:11 +00:00
Yiwei Zhang
48680d5505
venus: add back vn_QueuePresentKHR
...
Prepare to not rely on implicit fencing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39283 >
2026-01-13 19:47:10 +00:00
Yiwei Zhang
2c63534896
venus: add chain lock helpers for async present
...
The helpers will protect chain access during async present.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39283 >
2026-01-13 19:47:09 +00:00
Yiwei Zhang
0a2525491d
venus: prepare chain access for async present
...
During async presentation, swapchain is accessed by the async present
thread. With proper queue and chain access locks within venus driver,
we still have to rely on mesa common wsi implementation specifics for
optimal async present performance:
Below need to be protected:
- vkAcquireNextImage2KHR
- vkDestroySwapchainKHR
Below are safe:
- vkGetSwapchainImagesKHR
- vkWaitForPresentKHR
- vkWaitForPresent2KHR
- vkReleaseSwapchainImagesKHR
- VkSwapchainPresentFenceInfoKHR::pFences
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39283 >
2026-01-13 19:47:08 +00:00
Yiwei Zhang
ca18b73669
venus: track swapchains
...
Will be used internally to ensure synchronized host access of swapchain
object.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39283 >
2026-01-13 19:47:08 +00:00
Yiwei Zhang
fdb2a8f88f
venus: add vn_wsi_sync_wait to handle implicit sync workaround
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39283 >
2026-01-13 19:47:07 +00:00
Yiwei Zhang
37b95dc8d6
venus: vn_GetFenceFdKHR no need to block wait
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39283 >
2026-01-13 19:47:07 +00:00
Yiwei Zhang
6b3686f49b
venus: refactor to avoid nesting vn_QueueSubmit entrypoint
...
Prepare to wait for async queue present. This helps avoid redundant WSI
flushes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39283 >
2026-01-13 19:47:06 +00:00
Yiwei Zhang
391f11671a
venus: remove TP in vn_ResetDescriptorPool
...
This call can be verbose for some workloads.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39283 >
2026-01-13 19:47:06 +00:00
Yiwei Zhang
c8c6ee1dd7
venus: respect VK_SUBOPTIMAL_KHR returned from wsi image acquire
...
When suboptimal is returned, the fence payload is missed to be installed
unexpectedly. Instead, we can directly return errors from sync import.
With this change, dEQP-VK.wsi.xcb.maintenance1.release_images.* can pass
robustly now.
Fixes: a312bb4285 ("venus: refactor wsi acquire to use semaphore and fence SYNC_FD import")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39283 >
2026-01-13 19:47:05 +00:00
Valentine Burley
8cd82ce149
ci/android: Update to Android 16
...
Update the Cuttlefish image to Android 16, move to the r29 NDK, and build
Mesa with SDK version 35, the latest version currently supported.
The new Cuttlefish build switches the 'venus_guest_angle' mode to use the
`venus:cross-domain` context type instead of `virgl:virgl2:venus`, which
now works on Android 16. This mode also moves to the `skiavk` Vulkan
backend for HWUI and SurfaceFlinger.
The Cuttlefish repositories have also been moved to the new
https://gitlab.freedesktop.org/gfx-ci/android namespace.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39197 >
2026-01-09 15:35:00 +00:00
Andrew Sinclair
8f8bc7ca3b
gfxstream: revert "gfxstream: Add Vulkan func/structs for passing debugging data to host"
...
Breaks emulator 26Q1-release.
Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39205 >
2026-01-08 08:02:36 -08:00
Marek Olšák
1912a00a91
ALL: use SHA1_DIGEST_LENGTH etc. instead of hardcoding the numbers
...
only build_id is switched to use literal 20 instead of SHA1_DIGEST_LENGTH
because we will increase SHA1_DIGEST_LENGTH to BLAKE3_KEY_LEN
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110 >
2026-01-07 08:32:33 +00:00
Jason Macnak
462e73ce1c
gfxstream: Add Vulkan func/structs for passing debugging data to host
...
... and send data on connection creation.
Test: cvd create --gpu_mode=gfxstream_guest_angle
and go/cuttlefish-tracing to grab perfetto trace
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39161 >
2026-01-05 18:47:21 +00:00
Eric Engestrom
4f91d4d888
virtgpu_kumquat_ffi: mark single-item match as expected
...
It will presumably get more values in the future and should not just be
replaced with an `if`.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38924 >
2026-01-05 17:01:39 +00:00
Eric Engestrom
590daa1282
virtgpu_kumquat_ffi: use auto-deref instead of doing it by hand
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38924 >
2026-01-05 17:01:39 +00:00
Eric Engestrom
6cb997ab22
virtgpu_kumquat_ffi: use mutex.get_mut() instead of mutex.lock() to get compile-time garantee that the mutex isn't already locked
...
See https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#mut_mutex_lock
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38924 >
2026-01-05 17:01:38 +00:00
Eric Engestrom
ea9f75e85c
virtgpu_kumquat_ffi: mark the remaining allow annotations (all non_camel_case_types) as expected
...
`#[expect(...)]` instead of `#[allow(...)]` means that the linter warns
once the annotation should be removed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38924 >
2026-01-05 17:01:37 +00:00
Eric Engestrom
2b76adb765
virtgpu_kumquat: cleanup derelict allow(dead_code) & allow(unused) annotations
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38924 >
2026-01-05 17:01:37 +00:00
Yiwei Zhang
f4cd0bf810
venus: allow hw wsi for newer Nvidia proprietary driver
...
Prime buffer blit has been reported working on Nvidia driver version
590.48.01.
Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39069 >
2026-01-02 20:08:44 +00:00
Yiwei Zhang
5106ab5c7a
venus: track renderer driver version for driver workaround
...
Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39069 >
2026-01-02 20:08:44 +00:00
Yiwei Zhang
f47c9b3f9c
venus: amend missing VKAPI_ATTR/CALL for render pass APIs
...
Fixes: c696ec3b73 ("venus: add missing VKAPI_ATTR/CALL")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39033 >
2026-01-01 20:11:28 +00:00
Yiwei Zhang
166923bf0e
venus: adopt vk_common_GetCalibratedTimestampsKHR
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Venus driver already has to query host time domains within the guest to
be monotonic, so we can rely on the common impl as well and only query
device domain from the renderer.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38963 >
2025-12-21 16:47:30 +00:00
Yiwei Zhang
36c52644fa
venus: use vk_common_GetPhysicalDeviceCalibrateableTimeDomainsKHR
...
Only host domains are conditional, and they are checked with the common
vk_device_get_timestamp helper.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38963 >
2025-12-21 16:47:30 +00:00
Yiwei Zhang
9670c15d46
venus: hide vtest from Windows build
...
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/38969 >
2025-12-20 19:12:47 +00:00
Yiwei Zhang
1ddd09c72d
venus: refactor meson to be more flexible for additions
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969 >
2025-12-20 19:12:47 +00:00
anonymix007
55219167c6
venus: Guard Linux-specific code against being compiled on Windows
...
v2:
- drop most additions except thread id
- fix DRM_FORMAT_MOD_LINEAR in a different way
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969 >
2025-12-20 19:12:47 +00:00
Yiwei Zhang
d792403f0b
venus: disable TLS ring prio forwarding on Windows
...
The prios aren't consistent when guest and host are different OS'es.
Even if they are the same, sometimes the forwarding can hit other
permission issues. The entire ring prio thing has to be redesigned, and
before that we just disable it on Windows.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969 >
2025-12-20 19:12:47 +00:00
Yiwei Zhang
77b32df391
venus: hide unsupported external extensions on Windows
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969 >
2025-12-20 19:12:47 +00:00
anonymix007
342605f9b1
venus: Expose deviceLUID in props if available
...
v2: wrap props within id props and use snake case naming
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969 >
2025-12-20 19:12:47 +00:00
Yiwei Zhang
1aa273ae57
venus: hide unsupported device extensions on Windows
...
This change hides:
- VK_EXT_image_drm_format_modifier
- VK_EXT_map_memory_placed
- VK_EXT_physical_device_drm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969 >
2025-12-20 19:12:46 +00:00
Yiwei Zhang
c00c398995
venus: hide unsupported wsi extensions on Windows
...
Hide present id/wait extensions on Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969 >
2025-12-20 19:12:46 +00:00
Eric Engestrom
47ebdbab81
meson: add rust_global_args for flags for all the rust compilations
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807 >
2025-12-20 00:13:19 +01:00
Christian Gmeiner
b393518bdf
treewide: Use wsi_common_is_swapchain_image() helper
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Replace the duplicated swapchain image detection pattern across all
Vulkan drivers with the new wsi_common_is_swapchain_image() helper.
Since the swapchain handle can be extracted from VkImageCreateInfo's
pNext chain inside wsi_common_create_swapchain_image(), remove the
now-redundant VkSwapchainKHR parameter from that function.
This removes the #ifdef guards for Android/WSI platforms from each
driver, as the helper now handles this uniformly.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38541 >
2025-12-11 20:20:39 +00:00
Yiwei Zhang
c696ec3b73
venus: add missing VKAPI_ATTR/CALL
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14446
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38882 >
2025-12-10 18:11:07 +00:00
Yonggang Luo
be4ad5c819
meson: Remove VK_ICD_FILENAMES totally from source tree.
...
This is a follow up of
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28516
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> hk changes
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> for RADV changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38637 >
2025-12-10 14:46:11 +00:00
Valentine Burley
a65a7dbac9
ci: Uprev VKCTS
...
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38071 >
2025-12-10 11:31:31 +00:00
Yiwei Zhang
b42d7c3809
ci: uprev virglrenderer
...
This brings in latest virglrenderer that supports recently added venus
extensions.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38800 >
2025-12-04 21:38:54 +00:00
Yiwei Zhang
bb19e30e0d
venus: add VK_EXT_mesh_shader support
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This fills in the last piece for vkd3d-proton feature level 12_2.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38739 >
2025-12-03 07:21:53 +00:00
Yiwei Zhang
6fb6a740d9
venus: sync protocol for VK_EXT_mesh_shader support
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38739 >
2025-12-03 07:21:53 +00:00
Yiwei Zhang
a71b4a4b95
venus: device create to filter promoted swapchain_maintenance1
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
WSI extensions are implemented on the Venus driver side, layering on top
of external memory extensions. So we have to filter out WSI extensions
during device creation, otherwise the headless driver on the venus
renderer side can fail the device creation with _EXTENSION_NOT_PRESENT.
Fixes: 11195eb8de ("vulkan: Add KHR_swapchain_maintenance1 promotions.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38763 >
2025-12-02 17:12:24 +00:00
Hans-Kristian Arntzen
d7cf200b49
vulkan/wsi: Add missing KHR_surface_maintenance1 promotions.
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Weird that CTS did not catch that ...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: 11195eb8de ("vulkan: Add KHR_swapchain_maintenance1 promotions.")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38728 >
2025-11-30 12:17:33 +01:00
Hans-Kristian Arntzen
11195eb8de
vulkan: Add KHR_swapchain_maintenance1 promotions.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37157 >
2025-11-30 10:30:53 +01:00
Yiwei Zhang
6b9c4535f9
venus: support VK_EXT_shader_uniform_buffer_unsized_array
...
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/38722 >
2025-11-30 08:09:20 +00:00
Yiwei Zhang
918f81ff05
venus: support VK_EXT_shader_float8
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38722 >
2025-11-30 08:09:20 +00:00
Yiwei Zhang
d1181b6cb7
venus: support VK_KHR_shader_untyped_pointers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38722 >
2025-11-30 08:09:20 +00:00
Yiwei Zhang
7949aeafaf
venus: support VK_KHR_shader_bfloat16
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38722 >
2025-11-30 08:09:19 +00:00
Yiwei Zhang
219bb0e01e
venus: support VK_KHR_cooperative_matrix
...
Tested with dEQP-VK.compute.pipeline.cooperative_matrix.* on anv with
INTEL_LOWER_DPAS=true
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38722 >
2025-11-30 08:09:19 +00:00
Yiwei Zhang
463ab89afb
venus: sync latest protocol for more shader extensions support
...
Below are added:
- VK_KHR_cooperative_matrix
- VK_KHR_shader_bfloat16
- VK_KHR_shader_untyped_pointers
- VK_EXT_shader_float8
- VK_EXT_shader_uniform_buffer_unsized_array
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38722 >
2025-11-30 08:09:19 +00:00
Yiwei Zhang
5ca8113eb9
venus: sync protocol for sorted VkCommandTypeEXT enum defines
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38722 >
2025-11-30 08:09:19 +00:00