mesa/src/virtio/vulkan
Yiwei Zhang 829bd406c0
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
venus: fix racy semaphore feedback counter update
Previously, we update the sfb dst slot upon vn_SignalSemaphore so that
vn_GetSemaphoreCounterValue can poll just the feedback slot itself.
However, that can race with pending sfb cmds that are going to update
the slot value, ending up with stuck sync progression.

This change fixes it by disallowing vn_SignalSemaphore to touch the sfb
dst slot. To ensure counter query being monotonic, vn_GetSemaphoreCounterValue
now takes the greater of signaled counter and the sfb counter read.

Test with dEQP-VK.synchronization* group:
- w/o this: stuck shows up within 2 min with 8 parallel deqp runs
- with this: no stuck for multiple full runs of the same

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14304
Fixes: 5c7e60362c ("venus: enable timeline semaphore feedback")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38516>
2025-11-20 06:29:16 +00:00
..
.clang-format clang-format: Update the .clang-format files to conformance clang-format json-schema 2025-09-09 07:04:55 +00:00
meson.build vulkan: Compute path to write into JSON manifests once, use it everywhere 2025-09-26 10:47:31 +00:00
vn_acceleration_structure.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
vn_acceleration_structure.h venus: rename common vk object base member to vk 2025-03-15 22:14:58 +00:00
vn_android.c venus/android: clean up leftovers from common AHB helpers adoption 2025-08-05 19:22:20 +00:00
vn_android.h venus: use VK_USE_PLATFORM_ANDROID_KHR when applicable 2025-08-18 02:36:12 +00:00
vn_buffer.c venus: drop cached ahb buffer memory types 2025-07-29 07:50:10 +00:00
vn_buffer.h venus: drop cached ahb buffer memory types 2025-07-29 07:50:10 +00:00
vn_command_buffer.c treewide: Use vk_collect_dependency_info_src_stages 2025-10-22 19:22:17 +00:00
vn_command_buffer.h venus: use common cmd pool_link 2025-03-15 22:14:59 +00:00
vn_common.c venus: drop vn_trace_init 2025-08-08 16:02:31 +00:00
vn_common.h venus: Use SYS_thr_self on FreeBSD instead of SYS_gettid 2025-08-24 02:15:46 +00:00
vn_cs.c treewide: don't check before free 2025-10-15 23:01:33 +00:00
vn_cs.h venus: remove obsolete TODOs 2024-04-04 06:35:54 +00:00
vn_descriptor_set.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
vn_descriptor_set.h venus: rename common vk object base member to vk 2025-03-15 22:14:58 +00:00
vn_device.c venus: allow fence feedback to suspend and resume 2025-10-25 00:02:59 +00:00
vn_device.h venus: layer vkQueueSubmit2 over vkQueueSubmit w/o sync2 2025-08-16 19:14:17 +00:00
vn_device_memory.c venus: avoid re-imported dma-buf to have a larger map size 2025-11-19 04:28:48 +00:00
vn_device_memory.h venus: rework AHB memory import 2025-07-29 07:50:10 +00:00
vn_feedback.c venus: add vn_queue_family_can_feedback helper 2025-10-25 00:02:59 +00:00
vn_feedback.h venus: rewrite qfb vn_feedback helpers 2024-03-14 23:40:44 +00:00
vn_host_copy.c venus: implement host image copy commands 2025-02-26 19:16:48 +00:00
vn_icd.c venus: clang format fixes 2024-01-03 07:16:23 +00:00
vn_icd.h
vn_image.c venus: use VK_USE_PLATFORM_ANDROID_KHR when applicable 2025-08-18 02:36:12 +00:00
vn_image.h venus: drop is_wsi tracking and some asserts 2025-07-29 07:50:11 +00:00
vn_instance.c venus: drop vn_trace_init 2025-08-08 16:02:31 +00:00
vn_instance.h venus: rename common vk object base member to vk 2025-03-15 22:14:58 +00:00
vn_physical_device.c venus: enable sparse resource support on lavapipe 2025-11-05 08:26:40 +00:00
vn_physical_device.h venus: add vn_queue_family_can_feedback helper 2025-10-25 00:02:59 +00:00
vn_pipeline.c venus: fix msaa state sample location info sanitization 2025-06-28 20:25:23 +00:00
vn_pipeline.h venus: rename common vk object base member to vk 2025-03-15 22:14:58 +00:00
vn_query_pool.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
vn_query_pool.h venus: rename common vk object base member to vk 2025-03-15 22:14:58 +00:00
vn_queue.c venus: fix racy semaphore feedback counter update 2025-11-20 06:29:16 +00:00
vn_queue.h venus: allow timeline semaphore feedback to suspend and resume 2025-10-25 00:02:59 +00:00
vn_render_pass.c venus: rename common vk object base member to vk 2025-03-15 22:14:58 +00:00
vn_render_pass.h venus: rename common vk object base member to vk 2025-03-15 22:14:58 +00:00
vn_renderer.h venus: allow to build vtest-only on non-DRM/KMS systems 2025-07-09 14:43:09 +00:00
vn_renderer_internal.c venus: enable renderer shmem cache dump for cache debug 2023-12-08 04:06:37 +00:00
vn_renderer_internal.h venus: enable renderer shmem cache dump for cache debug 2023-12-08 04:06:37 +00:00
vn_renderer_util.c venus: fix a race condition in ring shmem reuse 2025-08-09 00:24:28 +00:00
vn_renderer_util.h venus: fix a race condition in ring shmem reuse 2025-08-09 00:24:28 +00:00
vn_renderer_virtgpu.c venus: add error log coverage for virtgpu backend 2025-11-19 04:28:49 +00:00
vn_renderer_vtest.c venus: clang-format 2025-05-16 14:12:36 +00:00
vn_ring.c venus: use seq_cst for ring cs and tail update ordering 2025-11-14 01:26:52 +00:00
vn_ring.h venus: drop vn_call usage on apis without any returns 2025-03-12 19:41:12 +00:00
vn_wsi.c venus: add a wsi image log 2025-11-16 15:37:16 +00:00
vn_wsi.h venus/wsi: move wsi image format info validation to vn_wsi 2025-07-17 20:12:23 +00:00