Commit graph

1458 commits

Author SHA1 Message Date
Yiwei Zhang
c2fe95a364 venus: fix to relax the KHR_external_memory_fd requirement
This reverts commit 1895de16a6. The proper
way to filter out venus incapable physical devices is to do the platform
specific check during renderer side instance creation time.

Fixes: 1895de16a6 ("venus: filter out venus incapable physical devices")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40478>
2026-03-23 17:39:53 +00:00
Marek Olšák
102d41799b Rename more sha and sha1 names to blake3
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:28 +00:00
Marek Olšák
d4831aaf5f Rename sha1_* and sha_* names to blake3_*
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:28 +00:00
Marek Olšák
c0ac992a2a Remove mesa-sha1.h
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:27 +00:00
Marek Olšák
699f9d7066 Inline _mesa_sha1_init/update/final functions
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:27 +00:00
Marek Olšák
a965ada6ee Inline mesa_sha1, SHA1_CTX
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:27 +00:00
Marek Olšák
110632f702 Inline SHA1_DIGEST_LENGTH
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:27 +00:00
Yiwei Zhang
1a302155ee venus: force prime blit on Nvidia GPU
Normally Venus on Nvidia GPUs takes the prime blit path. The exception
is when KWin or any wlroots based compositors are used:
1. KWin and wlroots based compositors always add LINEAR to dmabuf
   feedback tranches assuming LINEAR can be handled by GPU drivers.
2. Venus + Virgl only sees the compositor injected LINEAR mod since
   Virgl doesn't support explicit modifiers on the driver side.
3. Nvidia GPUs doesn't support LINEAR color attachment, and it's too
   late to reject LINEAR mod when the native image path has already
   been taken instead of the prime image path.

Gamescope requires VK_EXT_physical_device_drm and its runtime doesn't
use standard WSI extensions, so venus can spoof without impacting it.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40339>
2026-03-12 20:03:19 +00:00
Yiwei Zhang
b5655609b0 ci/venus: update expectation based on nightly job runs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/94723493

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40362>
2026-03-12 18:19:47 +00:00
Valentine Burley
2addcc1dce venus/ci: Add an Android Venus on Turnip job on a618
Add a nightly job running Cuttlefish with Venus on Turnip.

Similar to the existing Venus-on-ANV jobs, this uses Cuttlefish's
'venus_guest_angle' mode to run deqp-vk and deqp-egl with ANGLE and
Venus inside the Android guest, with Turnip on the host.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39993>
2026-03-10 09:54:03 +01:00
Valentine Burley
0478046036 venus/ci: Remove hanging timeout override for ADL and TGL jobs
New deqp-runner version prints messages more frequently.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39993>
2026-03-10 09:53:29 +01:00
Eric Engestrom
078fd1b19f venus/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40243>
2026-03-05 18:29:29 +00:00
Yiwei Zhang
f85416e79d ci/venus: skip broken drm display tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40227>
2026-03-04 20:20:14 +00:00
Valentine Burley
0468dbf989 venus/ci: Skip invalid SkQP test on ANV
This was clarified to be a spec violation: https://gitlab.khronos.org/vulkan/vulkan/-/issues/4713

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14912
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40111>
2026-02-26 09:46:11 +01:00
Yiwei Zhang
835fd613b5 venus: expose VK_EXT_descriptor_heap by default
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The debug option is now toggled. VN_DEBUG=no_desc_heap can disable the
extension.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40085>
2026-02-25 18:02:46 +00:00
Yiwei Zhang
f0e4ef50e3 venus: RegisterCustomBorderColorEXT can be async when index is requested
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40085>
2026-02-25 18:02:46 +00:00
Yiwei Zhang
718ecfc008 venus: amend to mark descriptor size cache initialized
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40085>
2026-02-25 18:02:46 +00:00
Valentine Burley
7672cccedb venus/ci: Increase android-angle-venus-anv-cml-cts timeout
Avoid false timeouts.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40080>
2026-02-25 08:40:28 +00:00
Gurchetan Singh
6c66b30add virtio/kumquat: add safety comments
This is to help enable to clippy safety lint tree-wide.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39222>
2026-02-23 17:20:10 +00:00
Yiwei Zhang
f83f7d43ee venus: the GCC DSE workaround is no longer needed
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The strict aliasing violation has been fixed in the protocol.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39979>
2026-02-20 06:00:46 +00:00
Yiwei Zhang
6411ee0c2d venus: sync protocol for strict aliasing compliance
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124148 for details.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13242
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39979>
2026-02-20 06:00:46 +00:00
Adam Jackson
527b642800 venus: advertise VK_KHR_shader_fma
v2: move feat and ext to KHR group instead of core group

v3: update docs

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39945>
2026-02-17 21:11:18 +00:00
Yiwei Zhang
5d141e6e09 venus: sync latest protocol for VK_KHR_shader_fma
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39945>
2026-02-17 21:11:18 +00:00
Yiwei Zhang
b0397b967d venus: workaround a gcc-15 dead store elimination (DSE) bug
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
No issue with clang or gcc-14.x (or earlier versions). The issue only
shows up since gcc-15.1. The compiler somehow fails to consider those
cs helpers dereferencing the pointer from the pNext chain for reads,
and thus has falsely optimized away the pNext store. This change works
around this with a no-op memory clobber.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13242
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39906>
2026-02-16 01:39:10 +00:00
Yiwei Zhang
a8baedef29 venus: expose VK_EXT_descriptor_heap behind a debug option
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
There's TODO for optimizing descriptor allocations, so currently we
expose the extension behind VN_DEBUG=desc_heap

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:30 +00:00
Yiwei Zhang
6265dad4f2 venus: fill descriptor heap feats and props
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:30 +00:00
Yiwei Zhang
dea6221a65 venus: take care of combined image sampler descriptor for ycbcr
We'd have to query it by reconstructing the sampler ycbcr conversion
image format props query. It's straightforward except having to consider
the modifier tiling case.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:30 +00:00
Yiwei Zhang
4f475789d5 venus: ensure descriptor writes invariance
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:30 +00:00
Yiwei Zhang
1d779f5af1 venus: cache descriptor size query
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:29 +00:00
Yiwei Zhang
dfc5d76205 venus: rename format_update_mutex for general purpose
Not worth separate locks for physical device level queries.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:29 +00:00
Yiwei Zhang
be52338399 venus: add vn_descriptor.h to be shared between different desc systems
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:28 +00:00
Yiwei Zhang
990b5fca37 venus: skip image cache for VkOpaqueCaptureDataCreateInfoEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:28 +00:00
Yiwei Zhang
526788a097 venus: pipeline layout is now optional
If descriptor heap is used, there's no pipeline layout created. So we
have to patch compute and RT pipelines to allow it. Graphics pipeline
doesn't need the change because of GPL.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:28 +00:00
Yiwei Zhang
95331f3bd0 venus: cmd inheritance info fix to consider descriptor heap
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:28 +00:00
Yiwei Zhang
485b2b501c venus: implement all descriptor heap commands
There're potential optimizations available for below:
- vkWriteSamplerDescriptorsEXT
- vkWriteResourceDescriptorsEXT
- vkGetPhysicalDeviceDescriptorSizeEXT
- vkRegisterCustomBorderColorEXT

...and we can revisit if there's perf hit from above for real apps.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:28 +00:00
Yiwei Zhang
04c0142aaa venus: sync latest protocol for VK_EXT_descriptor_heap support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:28 +00:00
Yiwei Zhang
04494efa7c venus: fix a prime blit assert...again
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The assert doesn't consider multiple queue family case where the same
blit cmd has to be recorded for each, thus hitting the assert for the
same image and buffer.

The prior fix of the same 054c8e117e was
accidentally missed in the reland of the implicit in-fence handling MR:
- https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14843
Fixes: eb709cba47 ("venus: track prime blit dst buffer memory in the wsi image")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39871>
2026-02-13 04:39:14 +00:00
José Expósito
dd3fe2d671 venus: Fix error log on PPC
On the ppc64le architecture error log fail to compile with error:

    ../src/virtio/vulkan/vn_renderer_virtgpu.c: In function ‘virtgpu_ioctl_map’:
    ../src/virtio/vulkan/vn_renderer_virtgpu.c:751:66: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘__u64’ {aka ‘long unsigned int’} [-Werror=format=]
    751 |          "mmap failed: gpu_fd=%d, handle=%u, size=%zu, offset=%llu, err=%s",
        |                                                               ~~~^
        |                                                                  |
        |                                                                  long long unsigned int
        |                                                               %lu
    752 |          gpu->fd, gem_handle, size, args.offset, strerror(errno));
        |                                     ~~~~~~~~~~~
        |                                         |
        |                                         __u64 {aka long unsigned int}
    cc1: some warnings being treated as errors

Parse the parameters to fix the failure.

Fixes: a49b7adad8 ("venus: add error log coverage for virtgpu backend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39775>
2026-02-09 21:35:45 +00:00
Yiwei Zhang
bb22e441b9 ci/android: revive some previously skipped tests
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/39750>
2026-02-07 06:58:33 +00:00
Yiwei Zhang
091c4f43ff venus: remove obsolete asserts for ANB image creation
Those have long been supported by vn_image_deferred_info_init because of
AHB support. For non-aliased ANB image, those are directly passed from
the platform swapchain create info as well. So we just need to drop the
obsolete asserts to make newer Android platform and ANGLE happy.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39750>
2026-02-07 06:58:33 +00:00
Dmitry Osipenko
b06d759a93 intel: Add virtio-gpu native context
Add virtio-intel native DRM context base preparatory code. Virtio-intel
works by passing ioctl's from guest to host for execution, utilizing
available VirtIO-GPU infrastructure.

This patch adds initial experimental native context support using i915
KMD UAPI.

Compile Mesa with -Dintel-virtio-experimental=true to enable virtio-intel
native context support.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29870>
2026-02-06 00:15:37 +00:00
Collabora's Gfx CI Team
96e62abdd4 Uprev ANGLE to 63d1dd7c2dfccf6acbd92af224b48aa6ada45f1c
b406401e42...63d1dd7c2d

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39224>
2026-02-02 19:05:23 +00:00
Yiwei Zhang
481df22209 venus: refactor Android ANB tracking to avoid confusions with WSI
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
WSI used to track the similar for aliased wsi image creation, but later
got deprecated. So let's rename wsi.memory to wsi.anb_mem and drop
wsi.memory_owned to avoid confusions with common wsi related trackings.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
2026-01-21 23:15:42 +00:00
Yiwei Zhang
849e3552e8 venus: properly handle wsi implicit in-fence
Vulkan is supposed to operate in explicit synchronization mode. However,
for legacy compositors that only support implicit fencing, we have to
extract the compositor implicit fence (release fence) and resolve it
properly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
2026-01-21 23:15:42 +00:00
Yiwei Zhang
211c21725c venus: refactor vn_AcquireNextImage2KHR
Prepare for valid implicit in-fence.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
2026-01-21 23:15:42 +00:00
Yiwei Zhang
9718847dbf venus: add vn_renderer_bo_export_sync_file helper
...and a renderer internal helper shared by virtgpu and vtest backend
when supported.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
2026-01-21 23:15:41 +00:00
Yiwei Zhang
3fca8423c9 venus: track dedicated image during mem alloc
Need this because the new common wsi interface only returns the wsi
memory from the acquired image index.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
2026-01-21 23:15:41 +00:00
Yiwei Zhang
eb709cba47 venus: track prime blit dst buffer memory in the wsi image
This is to prepare for handling WSI implicit acquire fence.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
2026-01-21 23:15:40 +00:00
Jason Macnak
bf55e43f30 gfxstream: Reland "Add Vulkan func/structs for passing debugging da..."
Reason for reland: relanding with host side fix

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39360>
2026-01-20 20:27:10 +00:00
Yiwei Zhang
2e683eb738 venus: fix aliased image memory requirement caching
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The spec doesn't guarantee that the aliased and non-alised image shares
the same memory requirement.

Fixes: 63cac09d74 ("venus: improve image memory requirement cache for image aliasing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39398>
2026-01-20 18:10:04 +00:00