Commit graph

1029 commits

Author SHA1 Message Date
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
Eric Engestrom
6b6655c1a8 venus/ci: fix indentation of list nested in a dict item
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29803>
2024-06-20 19:39:01 +00:00
Corentin Noël
75820a5436 venus/ci: Update expectations
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29803>
2024-06-20 19:39:01 +00:00
Daniel Stone
30fd78a7e7 venus/ci: Temporarily disable jobs
There are too many failures. The job can be re-enabled when these have
been fixed (e.g. with skips) and the new lower fraction has been
stress-tested.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29709>
2024-06-13 09:58:02 +01:00
Daniel Stone
78f52e59be venus/ci: Significantly reduce CTS fraction
The jobs are just way too slow, regularly clocking in at over 20min and
being the long pole, especially when combined with failures.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29709>
2024-06-13 09:57:26 +01:00
Daniel Stone
f2866fe971 venus/ci: Fix timeout
Nothing should be running with unbounded timeouts; unfortunately
venus-lavapipe does and is bouncing off them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29709>
2024-06-13 09:56:25 +01:00
Corentin Noël
11812ae2aa venus/ci: add more recently found flakes
Found in https://gitlab.freedesktop.org/mesa/mesa/-/jobs/59745506

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29681>
2024-06-12 10:27:48 +00:00
Juston Li
5ac539d70d venus: sync protocol for conditionally ignored dyn arrays
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29661>
2024-06-11 01:14:19 +00:00
Eric Engestrom
73cc6c6738 venus/ci: add flake that's been blocking MRs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29590>
2024-06-07 01:24:26 +00:00
Yiwei Zhang
000d2d0b96 venus: defer qfb buffer init upon query being used
Previously the qfb mem alloc can exceed open fd limit, failing the
renderer side blob mem export.

Fixes: c97f9193ef ("venus: drop internal memory pools")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29540>
2024-06-04 22:39:30 +00:00
Yiwei Zhang
c71f650c2d ci/venus: skip a timeout test
There're already a few similar ones being skipped.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29362>
2024-05-24 02:34:45 +00:00
Yiwei Zhang
60488962db venus: allow non-wsi image alias path to passthrough upon bind memory
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29362>
2024-05-24 02:34:45 +00:00
Yiwei Zhang
c97f9193ef venus: drop internal memory pools
This exists due to historical limitations which have long gone obsolete.
This persists longer due to hostorical perf issues that have recently
gone obsolete on the platforms shipping Venus. Meanwhile, clients like
skiavk and ANGLE nowadays do a better job managing suballocations. The
tiny perf win from having this giant internal pool has been beaten by
the memory waste, longer one-shot jank due to largier alloc, allocations
no need to be mapped but only because host-visible is advertised across
mem types and varies workarounds and markups needed to make alignment
work and make VVL happy. Dropping it also reduces the maintenance cost.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29362>
2024-05-24 02:34:45 +00:00
Rob Clark
27ebf58ee8 virgl: Update headers
VIRGL_RENDERER_UNSTABLE_APIS has been dropped upstream

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28777>
2024-05-23 20:02:03 +00:00
Corentin Noël
be6fece6e1 venus: enable VK_KHR_maintenance5
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29058>
2024-05-22 18:15:34 +00:00
Corentin Noël
3359fbc25b venus: sync protocol for VK_KHR_maintenance5
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29058>
2024-05-22 18:15:34 +00:00
Juston Li
4b3e286d33 venus: add missing sTypes for vk_set_physical_device_properties_struct
The contents were previously copied with vk_copy_struct_guts(),
now that we use vk_set_physical_device_properties_struct, the sType
is needed.

Fixes: ("3c152a6e5dd venus: Use common physical device properties")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29314>
2024-05-21 23:01:37 +00:00
Juston Li
db58d0f40b venus: forward nice priority when creating ring
Forward the nice priority to the renderer so that corresponding renderer
threads are created with the same priority.

For backwards compatibility, conditioned on
VK_MESA_VENUS_PROTOCOL_SPEC_VERSION >= 2

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29012>
2024-05-17 00:03:44 +00:00
Juston Li
4d2d49c63f sync protocol for VkRingPriorityInfoMESA
Bumps VK_MESA_VENUS_PROTOCOL_SPEC_VERSION to 2

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29012>
2024-05-17 00:03:44 +00:00
Yiwei Zhang
374a14ce4c venus: define VN_SET_VK_PROPS(_EXT) to simplify vk props init
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Reviewed-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29180>
2024-05-16 01:58:14 +00:00
Oskar Viljasaar
3c152a6e5d venus: Use common physical device properties
This lets us delegate the GPDP2 entrypoint to common code.
This also lets us delete struct vn_physical_device_properties,
as it is redundant with struct vk_properties present in the runtime.

Move the properties present in vn_physical_device_properties to the
local_devices struct used to query the host device properties, so we can
still get and fill those properties.

Replace accesses to struct vn_physical_device with accesses to
struct vk_properties filled in at device initialization time.

v2: rebase and a few fixups (zzyiwei)
- rely solely on vk props for final props sanitizations
- set vk11 props behind vk 1.2 condition
- set default pci props if forwarded
- set extension props based on extension support

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Reviewed-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29180>
2024-05-16 01:58:14 +00:00
Yiwei Zhang
eb9a394e3c venus: move props sanitization to a separate helper
So the main init properties function is clean. Also avoid giving any
sort of sane value for framebufferIntegerColorSampleCounts when we don't
query from 12 props directly, since the client side won't query that in
that case.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Reviewed-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29180>
2024-05-16 01:58:14 +00:00
Yiwei Zhang
dceb1b0c4d venus: move custom props fill from GPDP2 to props init
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Reviewed-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29180>
2024-05-16 01:58:14 +00:00
Yiwei Zhang
0197924d63 venus: directly use vk drm and pci props in renderer info
We don't have to fill sType or pNext, and the default renderer info has
been zero-init already.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Reviewed-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29180>
2024-05-16 01:58:14 +00:00
Yiwei Zhang
758b639d1b venus: drop the workaround for excessive dma-buf import oom on turnip
This reverts commit fdc21a95aa.

No longer needed per prior commit.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29173>
2024-05-13 21:58:37 +00:00
Vignesh Raman
26417211ae virtio/ci: separate hiden jobs to -inc.yml files
make it easier to re-use the hidden jobs by other project (e.g. linux)
without enabling the executable jobs.

Inspired on 9442571664 ("ci: separate hiden jobs to -inc.yml files").

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29084>
2024-05-07 18:01:51 +00:00
Mark Collins
854640ea26 vdrm: Add fixed VA parameter for mapping memory
This is necessary for implementing VK_EXT_map_memory_placed in Turnip.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28928>
2024-05-05 14:38:27 +00:00
Dmitry Osipenko
087e9a96d1 venus: make cross-device optional
Cross-device is a virtio-gpu feature that enables sharing host blob
dma-bufs with other virtio devices, like virtio-wl or virtio-video.
This feature is mainly used by ChromeOS and not required if there is
no dma-buf sharing. Venus has a hard requirement for the cross-device
feature.

Qemu doesn't support cross-device. Relax cross-device feature requirement
by making it optional, allowing Venus to work on Qemu.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29040>
2024-05-03 17:54:33 +00:00
Yiwei Zhang
4ec84adbed venus: fix to destroy all pipeline handles on early error paths
For early error returns, all pipeline handles have to be destroyed.
Otherwise the caller will treat those valid handles as successfully
created pipeline objects.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28944>
2024-04-26 17:35:29 +00:00
Ryan Neph
ee7e0168a1 venus: reclaim signal semaphore feedback resources for wasteful clients
Pending feedback resources (cmds, buffers, slots) for timeline semaphores are
generally reclaimed for re-use during subsequent semaphore waits/queries or any
queue submission containing at least one "wait" semaphore.

They are never reclaimed in the unexpected case when all submissions only
contain "signal" timeline semaphores, which consume such resources but
are never subsequently queried or waited upon.

This strange behavior is observed in several Valve games (Portal 2,
L4D2, CS2), which all run natively on linux with their own internal
distributions of DXVK v2.0 (at time of this MR submission). A Cursory
analysis of recent DXVK history indicates that it may be gone by v2.1.

The consequence is rapid guest memory leak and host Vk resource leak,
resulting in a crash within 1-2 minutes.

Fix that leak by running the reclaimation procedure for submissions with
_any_ accompanying semaphores.

Fixes: d63432012d ("venus: refactor semaphore feedback")
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28915>
2024-04-26 06:17:37 +00:00
Yiwei Zhang
fdc21a95aa venus: workaround excessive dma-buf import failure on turnip
Workaround dEQP-VK.wsi.android.swapchain.simulate_oom.* test failures on
turnip where excessive imports can fail, and venus has to propagate oom.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28941>
2024-04-26 05:56:42 +00:00
Yiwei Zhang
824a8542d7 venus: silence a stack array false alarm
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28914>
2024-04-26 05:37:02 +00:00
Yiwei Zhang
3e16d25d1a venus: avoid client allocators for ring internals
There're many cases in which the ring submissions must succeed. We don't
worry about real oom since things would fail earlier. For simulated oom
from random intentional allocs, there isn't robust way to fail those
must succeeds. e.g. the commands that don't have return codes or valid
error return struct defaults. So real oom propagation is still at best
effort.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28914>
2024-04-26 05:37:02 +00:00
Juston Li
ce1bbd241e venus: extend image cache to vkGetDeviceImageMemoryRequirements
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28887>
2024-04-25 02:48:50 +00:00
Juston Li
f4f8f2ecbb venus: refactor out image requirements helpers
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28887>
2024-04-25 02:48:50 +00:00
Samuel Pitoiset
59d3a8ea07 ci: uprev CTS to 1.3.8.2
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28871>
2024-04-24 10:48:11 +00:00
Corentin Noël
ca861e8f75 ci: Add zink-venus-lvp job
Test Zink on Venus on Lavapipe.

Acked-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27790>
2024-04-24 09:01:15 +00:00
Yiwei Zhang
4fc3f11545 venus: fix VkDeviceGroupSubmitInfo::deviceMask for feedback cmds
Unlike sync2, a legacy deviceMask of zero is indeed to skip.

Fixes: 80f532a636 ("venus: fix VkDeviceGroupSubmitInfo cmd counts from feedback")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28888>
2024-04-24 02:43:46 +00:00
Samuel Pitoiset
40f39482e1 ci: uprev CTS to vulkan-cts-1.3.8.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27459>
2024-04-17 21:22:36 +00:00
Yiwei Zhang
737bae4267 venus: fix swapchain image memory bind
Fixed dEQP-VK.wsi.*.swapchain.simulate_oom.image_swapchain_create_info

Fixes: 36f639375b ("venus: use STACK_ARRAY to simplify BindImageMemory2")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28790>
2024-04-17 18:32:42 +00:00
Yiwei Zhang
831da93d76 venus: clean up legacy descriptor update template bits
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:42 +00:00
Yiwei Zhang
5223cf2b11 venus: use STACK_ARRAY to simplify set template update and push
No regression in related vkoverhead benches.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:42 +00:00
Yiwei Zhang
7e01ffe733 venus: simplify need and ignore rules for desc image info
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:41 +00:00
Yiwei Zhang
378db530ae venus: optimize set update template data population
also avoids not-always-valid void * ptr arithmatic

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:41 +00:00
Yiwei Zhang
498f1d7eb1 venus: simplify push descriptor update with template
No need to track is_push_descriptor in templ. No need to conditionally
decide to use set or NULL handle since we pass NULL handle from the cmd
side. Also fixed the arg type mismatch in the template helper.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:41 +00:00
Yiwei Zhang
4c6b9e2fbe venus: fix to drop an extra ;
Fixes: 32283b9703 ("Refactor and add template support for iub")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:41 +00:00
Yiwei Zhang
be84424738 venus: avoid the redundant template entry
offset to count would give count number of entries

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:41 +00:00
Yiwei Zhang
abc327a39a venus: use more relaxed profile for TLS ring seqno wait
Excessive polling for TLS ring synchronous cmds is a waste of cpu
cycles.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28706>
2024-04-13 00:52:22 +00:00
Yiwei Zhang
c603dee104 venus: use STACK_ARRAY to simplify descriptor set update and push
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28563>
2024-04-10 01:01:37 +00:00