mesa/src/virtio/vulkan
Simon McVittie b860ae309a vulkan: Optionally share one JSON manifest per driver between architectures
If the library_path is just a basename like `libvulkan_lvp.so`, then we
can share the same JSON manifest like `lvp_icd.json` between all of the
architectures, like we already do for Vulkan layers. The library will
be looked up in the dynamic linker's default search path in this case,
and in practice will be found in `${libdir}`. This is how the Mesa's
EGL driver and Vulkan layers work, how Mesa is packaged in Debian 13,
and also how the Nvidia proprietary driver works; it makes installation
simpler for distros, especially on multiarch systems like Debian and
the freedesktop.org SDK.

However, if we want a separate manifest per architecture in order to
be able to write the full path into it, we still need per-architecture
filename disambiguation like `lvp_icd.x86_64.json`.

We presumably still want a separate per architecture on Windows, because
the concept of a single monolithic `${libdir}` is less common there, and
it can also be helpful during development when setting `$VK_DRIVER_FILES`
to force the use of a specific driver installed in a non-default location.

Use the following parameter to passed to vk_icd_gen:
'--icd-lib-path', vulkan_icd_lib_path,
'--icd-filename', icd_file_name,
output : 'virtio_icd.' + vulkan_manifest_suffix,

and the output is passed by '--out', '@OUTPUT@',
so we can detect vulkan_manifest_per_architecture from the --out parameter in script.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13745
Signed-off-by: Simon McVittie <smcv@collabora.com>
Co-authored-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37314>
2025-11-24 19:05:57 +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: Optionally share one JSON manifest per driver between architectures 2025-11-24 19:05:57 +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
vn_renderer_internal.h
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