Commit graph

1447 commits

Author SHA1 Message Date
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
Gurchetan Singh
f38a25fd6b virtio/kumquat: fixes to enable meson2hermetic
The "log" dependency has loaded connotations since it's already
used for ALOGE(..) via the fake Android pkg-config files.

Use "rust-log" and "rust-libc" to mirror the clearer Debian
naming conventions.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39279>
2026-01-20 17:17:57 +00:00
Yiwei Zhang
419a3e66f8 venus: allow vtest to properly wait for present
Previously common wsi has a special submission to install implicit fence
to wsi memory directly, which has been deprecated in favor of bonfire
implicit fencing (implicit fencing has been turned into explicit fencing
within vulkan since then). The virtgpu backend is fine but the vtest
backend has been regressed since then, only relying on renderer side hw
driver doing implicit fencing.

With async present landed earlier, we can directly tell which submission
is done by common wsi, and can revive the idle waiting accordingly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39377>
2026-01-19 21:01:13 +00:00
Yiwei Zhang
d4e2184904 venus: refactor vn_QueueSubmit2
To prepare for fixing vtest wsi present.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39377>
2026-01-19 21:01:13 +00:00
Yiwei Zhang
c2c9266fed venus: workaround to consider ALIAS for image mem req cache
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
ANV can return different memory requirements with and w/o the ALIAS bit.
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/14671 for details.

Meanwhile, venus has a driver side cache for image memory requirements.
As blessed per spec for memory aliasing, venus strips the ALIAS bit when
populating the cache key. Because of the use of imageless mem req query,
the ALIAS mem req now can hit the cache first, leaving a smaller/relaxed
requirement in the cache...busted.

Venus is unable to fix ANV behavior behind the scene, so this workaround
is only to align Venus behavior with ANV to not suffer from Venus-only
rendering artifacts.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39368>
2026-01-18 08:48:01 +00:00
Yiwei Zhang
fea23746ce venus: amend missing logs for image format cache dump
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39339>
2026-01-18 08:10:53 +00:00
Yiwei Zhang
c57659c9a3 venus: cache VkBufferUsageFlags2CreateInfo
Proton has widely used this struct.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39339>
2026-01-18 08:10:53 +00:00
Yiwei Zhang
a16ae2f684 venus: refactor vn_buffer_get_cache_index
Prepare to handle VkBufferUsageFlags2CreateInfo.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39339>
2026-01-18 08:10:53 +00:00
Yiwei Zhang
25970096d4 venus: only preserve 12 bits for VkBufferCreateFlagBits
Save more bits to prepare for VkBufferUsageFlags2CreateInfo.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39339>
2026-01-18 08:10:52 +00:00
Valentine Burley
71171abadb venus/ci: Switch Alder Lake job to Xe KMD
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The Android 16 Cuttlefish build comes with a new Xe minigbm backend that
we can use on the host in the android-angle-venus-anv-adl nightly job.
Also update two outdated comments.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39297>
2026-01-13 22:48:26 +00:00
Yiwei Zhang
c8144ae072 venus: vn_wsi_sync_wait to relax queue access for async present
As mentioned in earlier commit, for sem fd export on async present
thread, it occurs after internal queue submissions for all swapchains.
So we can allow queue commands while sync wait w/o violating ordering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39283>
2026-01-13 19:47:14 +00:00
Yiwei Zhang
6b5a4b55fb venus: enable async presentation along with a perf option
Async presentation can be disabled via VN_PERF=no_async_present

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39283>
2026-01-13 19:47:13 +00:00