Commit graph

1077 commits

Author SHA1 Message Date
Antonio Ospite
1c96335d01 ci/android: improve handling of expectation files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Valentine Burley
d195e411fa ci: Uprev VKCTS to 1.4.1.1
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Valentine Burley
f3cf156ac9 ci: Uprev VKCTS to 1.4.1.0
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Corentin Noël
ab5084b054 virgl: Update virgl_hw.h from virglrenderer
Use the latest version and update the supported formats.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32706>
2025-01-07 13:15:46 +00:00
Antonio Ospite
578fb242f9 ci/android: add ci rules to test venus on Android
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Valentine Burley
13421a9fef venus/ci: Update expectations
These tests have been crashing or failing for a while now.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32729>
2024-12-30 11:31:10 +00:00
Valentine Burley
d3d95c2a82 venus/ci: Bump the number of tests per group
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group in the deqp-runner suite
to bring job durations within a reasonable range.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32729>
2024-12-30 11:31:10 +00:00
Faith Ekstrand
2fae75b278 treewide: Stop putting enum in front of Vulkan enum types
The Vulkan headers add typedefs to fix aliasing issues whenever a type
gets renamed.  However, C doesn't allow "enum typedef" so this doesn't
work if people stick the "enum" keyword in front.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Rob Clark
dfd519ed80 vdrm+tu+fd: Make cross-device optional
Similar to commit 087e9a96d1 ("venus: make cross-device optional"),
make VIRTGPU_BLOB_FLAG_USE_CROSS_DEVICE use optional, because qemu does
not support this.

Fixes: 06e57e3231 ("virtio: Add vdrm native-context helper")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32392>
2024-11-28 19:55:11 +00:00
Eric Engestrom
ad42be50c9 ci/deqp: fully isolate deqp builds
Since the builds can be from very different versions of the code, we
need to make sure the common bits are compiled from the correct code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Dave Airlie
25b8f4f714 venus: handle device probing properly.
Currently if you try to probe the virtio ICD on a non-virtio system
it will fail in CreateInstance which causes the loader to spit on the
screen.

However instance creation shouldn't fail, the driver should just
not enumerate any devices in this case. It's a bit tricky to ensure
this, but return instance and then handle instance destruction
and fail device enumeration.

Cc: mesa-stable
Reviewed-by: Ryan Neph
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32266>
2024-11-22 13:06:11 +10:00
Corentin Noël
89d709a43e virgl: Propagate the GL_MAX_stage_SHADER_STORAGE_BLOCKS for each stage
Some hardware have a higher number in the computer stage than in others, let's
simply propagate everything when possible.

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

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31666>
2024-11-08 12:26:06 +00:00
Connor Abbott
3df6c19a22 virtio/drm: Update header
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26578>
2024-10-17 18:17:18 +00:00
Daniel Stone
3e7c9aad8a ci/virgl: Fix library path
We need to set $LD_LIBRARY_PATH so we can find GL/Vulkan at all, and
$LIBGL_DRIVERS_PATH so Xvfb will pick up the correct DRI modules.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Alyssa Rosenzweig
78a202157e virtio/vdrm: don't spam
number of log splat would be proportional to # of enabled vdrm drivers
otherwise. silences a pile of

   MESA: info: wrong context_type: 2

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31243>
2024-10-04 16:30:17 +00:00
Samuel Pitoiset
e120176c58 ci: uprev VKCTS to 1.3.9.2
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31423>
2024-10-01 17:30:38 +00:00
Yiwei Zhang
0767f91c8a venus: avoid over-caching sfb cmds
For most runtime usages, e.g. apitrace via zink on venus, the sfb cmds
normally don't exceed 3. So a limit of 5 cmds would be enough. This
would avoid that dEQP-VK.synchronization.basic.timeline_semaphore.chain
can easily leave 700+ free cmds in the cache.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31035>
2024-09-05 19:17:22 +00:00
Daniel Stone
31aa56ab4a ci/{lvp,venus}: Skip massive-alloc tests
Don't try to allocate gigantic amounts of memory on shared runners. It's
just not a good idea.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30993>
2024-09-03 18:41:50 +00:00
Eric Engestrom
0cbd5bbb47 venus/ci: add flake and skip timing out test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30928>
2024-08-29 19:21:52 +00:00
Eric Engestrom
71dbe29537 venus/ci: drop redundant flakes definitions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30928>
2024-08-29 19:21:52 +00:00
Yiwei Zhang
7941d705c3 venus: workaround cacheline overflush issue on Intel JSL
We observed that Venus on ANV on JSL platform has some cacheline flush
issue. The overflush shows up as:
1. There're 2 threads venus bliting the feedback buffers suballocated
   from the same backing device memory, back to back.
2. On thread A, flushing the feedback buffer for cpu read is placed
   behind flushing a shader storage buffer for cpu read.
3. On thread B, flushing a different feedback buffer with the same
   backing device memory (different offset bound to) can kick the
   feedback buffer flush in (2) earlier than it should be flushed.
4. As a result, CPU polling thread for thread B results would see venus
   feedback buffer update earlier than shader storage buffer results
   being updated, breaking Venus sync primitives optimization.

During investigation, a solid workaround for JSL platform is to force
Venus to align up to 128 bytes for feedback buffer suballocation while
the default is at 64 bytes.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30879>
2024-08-28 00:43:59 +00:00
Eric Engestrom
f5923fc2dc venus/ci: move postmerge jobs to -postmerge stage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30807>
2024-08-23 11:53:41 +00:00
Lucas Fryzek
0acdb82814 venus/ci: Update skip tests to prevent timeouts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28735>
2024-08-01 08:45:54 +00:00
Yiwei Zhang
f788c87d02 venus: fix a race condition between gem close and gem handle tracking
After using sparse array to manager virtgpu bo, we set gem_handle to 0
to indicate that the bo is invalid. However, the gem handle gets closed
before that and can be reused by another newly created bo, leading to
the tracked gem handle being unexpectedly zero'ed out.

Fixes: 88f481dd74 ("venus: make sure gem_handle and vn_renderer_bo are 1:1")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30362>
2024-07-25 18:13:21 +00:00
Yiwei Zhang
1af2f5e198 ci: re-enable venus ci
Skip dEQP-VK.binding_model.mutable_descriptor.multiple_arrays_mixed.*
because lavapipe behind venus can end up returning OODM for device
memory allocations.

The instability likely started from lavapipe gaining support of dma-buf
import/export. Then vkr renderer would no longer use the opaque fd
export with lavapipe, and we are hitting certain bottleneck of udmabuf.

Let's get venus ci re-enabled now and we can later flip vkr back to
prefer opaque fd export if seeing lavapipe for comparison.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Daniel Stone <daniel.stone@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30356>
2024-07-24 22:25:23 +00:00
Yiwei Zhang
a27e3c5078 venus: clarify wsi image ownership
Fix to call vn_image_bind_wsi_memory as long as the image is a wsi
image. This is needed so that we track the wsi memory in the wsi image
so that creating from swapchain info works normally on x11/wayland
platforms. This change also make it clear that ANB image owns the wsi
memory

Fixes: c4b30b604f ("venus: support VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 8")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30278>
2024-07-23 02:58:41 +00:00
Eric Engestrom
5c5df9376f venus: initialize bitset in CreateDescriptorPool()
Fixes: de5879447b ("Track bitset when create descriptor pool")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30286>
2024-07-21 17:44:05 +00:00
Yiwei Zhang
bb7632128b venus: only request ring thread prio for TLS ring
Mainly to leave main ring thread prio to default.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30279>
2024-07-20 17:27:24 +00:00
Eric Engestrom
e2c90da560 venus/ci: skip timing out test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Daniel Stone
e05415a82e format: Generate endian-independent format aliases
Instead of having a hardcoded list of endian-independent format aliases
in the header, generate them from the format definitions.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29649>
2024-07-19 13:50:42 +00:00
Yiwei Zhang
c2d26a5c08 venus: simplify cached mem type emulation
Instead of exposing the original cached memory type index and silently
remapping to the first coherent, we could directly append the cached bit
to the first coherent if coherent-cached doesn't exist.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30144>
2024-07-12 21:28:15 +00:00
Ryan Neph
969cb02de7 venus: chain VkExternalMemoryAcquireUnmodifiedEXT for wsi ownership transfers
Venus implements guest WSI on host external memory and thus cannot
transition guest wsi images to/from VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.

Thus, when a client would attempt to transition a Venus wsi image
to/from VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, Venus instead transitions
to/from VK_IMAGE_LAYOUT_GENERAL and performs an explicit ownership
transfer to/from VK_QUEUE_FAMILY_FOREIGN_EXT. Unfortunately, the
read-only guarantee of VK_IMAGE_LAYOUT_PRESENT_SRC_KHR is lost.

Upon the "acquire from foreign queue" side of that symmetry, when a
client would attempt to retain the contents of the image (i.e.
transition from VK_IMAGE_LAYOUT_PRESENT_SRC_KHR instead of
VK_IMAGE_LAYOUT_UNDEFINED), Venus knows that the image's backing memory
has not been modified. Thus, when those "acquire from FOREIGN queue"
ownership transfers flow to the native driver, Venus can signal it to
skip any acquisition-time validation of an image's internal data,
obtaining the same optimization as native WSI.

This is useful for drivers such as ARM's Mali (with Transaction
Elimination) that would otherwise need to recompute costly per-tile
checksums (CRCs) to ensure that they haven't gone stale during FOREIGN
ownership of the image's memory.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29777>
2024-07-10 18:57:27 +00:00
Ryan Neph
3f86894639 venus: skip barrier fixes as early as possible
Image memory barriers don't need to be fixed when Venus' internal
"presentable" layout is PRESENT_SRC (generally only in specific types of
debugging). In that case, skip barrier fixes as early as possible and
remove early returns from procedures deeper in the call stack.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29777>
2024-07-10 18:57:27 +00:00
Ryan Neph
1656eb4706 venus: refactor image memory barrier fix storage and conventions
Prepare to allocate VkExternalMemoryAcquireUnmodifiedEXT structs from
command pool cached storage with the same lifetime as
VkImageMemoryBarrier(2) structs.

Also use common parameter naming and function call signatures for the
both the barrier and barrier2 variants.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29777>
2024-07-10 18:57:27 +00:00
Ryan Neph
53f0c12b0c venus: factor image memory barrier fixes to common implementation
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29777>
2024-07-10 18:57:27 +00:00
Ryan Neph
a5e4880cbe venus: enable VK_EXT_external_memory_acquire_unmodified
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29777>
2024-07-10 18:57:27 +00:00
Ryan Neph
b57b332b86 venus: sync headers for VK_EXT_external_memory_acquire_unmodified
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29777>
2024-07-10 18:57:26 +00:00
Eric Engestrom
801ed4d032 ci: simplify setting .no-auto-retry now that it isn't bundled with unrelated rules:
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30004>
2024-07-07 19:31:44 +00:00
Eric Engestrom
f37af2ab8c ci: split .no-auto-retry out of .scheduled_pipeline-rules
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30004>
2024-07-07 19:31:44 +00:00
Yiwei Zhang
2d728a037a venus: tentative fix for test flakiness from invalid ring wait
If ring is already current when creating bo, we skip the ring wait but
miss to invalidate bo ring seqno. There's a false-positive for sending a
ring wait upon free memory if the ring has consumed about UINT32_MAX
bytes of traffic (unrelated to ring size).

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29988>
2024-07-02 03:25:49 +00:00
David Heidelberg
68215332a8 build: pass licensing information in SPDX form
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Dylan Baker <dylan.c.baker@intel.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29972>
2024-06-29 12:42:49 -07:00
Konstantin Seurer
e6772654ac venus: Disable sparse binding on lavapipe
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408>
2024-06-27 09:29:34 +00:00
Konstantin Seurer
6f28bf41f2 venus: Refactor hiding sparse features and properties
Disabling them after querying allows for driver workarounds.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408>
2024-06-27 09:29:34 +00:00
Yiwei Zhang
c4b30b604f venus: support VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 8
The aliased WSI image creation path is very much like the AHB case. It's
also the same with the deferred ANB binding path to support
VK_EXT_swapchain_maintenance1. Drop the cap as mesa currently only
supports up to spec version 8 because the later versions haven't been
upstreamed to the Vulkan registry yet.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29864>
2024-06-25 09:08:12 +00:00
Yiwei Zhang
9420e90dfb venus: refactor to add vn_android_image_from_anb_internal
This changes splits the anb image creation and anb memory import out to
be prepared for later aliased anb image bind.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29864>
2024-06-25 09:08:11 +00:00
Yiwei Zhang
f2c1931010 venus: refactor vn_android_image_from_anb
Drop redundant codes. Add sufficient error logs on the wsi image
creation path.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29864>
2024-06-25 09:08:11 +00:00
Eric Engestrom
b55158d536 venus/ci: drop fixed test from fails list
Might be a flake though, we'll see in the next nightly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29844>
2024-06-21 17:24:32 +00:00
Eric Engestrom
98f9dd3c7c venus/ci: make sure nightly job doesn't get retried
It's long enough as it is, we don't want to waste 2x the resources when
a test fails.

Fixes: 0db4bb2ea0 ("venus/ci: add manual/nightly venus-lavapipe-full")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29844>
2024-06-21 17:24:32 +00:00
Eric Engestrom
152571bc0c venus/ci: skip timed out test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29803>
2024-06-20 19:39:02 +00:00
Eric Engestrom
0db4bb2ea0 venus/ci: add manual/nightly venus-lavapipe-full
Technically not a "full" pipeline because that would take 12h, but
1/6 is much closer to it than the 1/60 that we can have in the merge
pipeline.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29803>
2024-06-20 19:39:02 +00:00