mesa/src/microsoft/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
..
dzn_abi_helper.h
dzn_cmd_buffer.c treewide: Replace calling to function ALIGN with align 2025-11-12 21:58:40 +00:00
dzn_descriptor_set.c treewide: Replace calling to function ALIGN with align 2025-11-12 21:58:40 +00:00
dzn_device.c dozen: return INCOMPATIBLE_DRIVER on instance create failure 2025-11-24 00:29:12 +00:00
dzn_dxcore.cpp
dzn_dxgi.c
dzn_dxgi.h
dzn_image.c vulkan: Drop the driver_internal from vk_image_view_init/create() 2025-09-05 23:34:14 +00:00
dzn_meta.c util/hash_table: don't allocate hash_table_u64::table, declare it statically 2025-08-21 06:13:48 +00:00
dzn_nir.c dozen: Use NIR_PASS instead of NIR_PASS_V 2025-07-25 08:55:14 -07:00
dzn_nir.h dzn: Rework indirect drawing keys for shaders and command signatures 2024-04-05 00:25:41 +00:00
dzn_physical_device_enum.h dzn: Include vulkan_core.h instead of vulkan.h in the device enum header 2024-03-25 19:11:35 +00:00
dzn_pipeline.c microsoft: switch to new subgroup size info 2025-09-12 21:05:17 +00:00
dzn_private.h build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
dzn_query.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
dzn_sync.c
dzn_util.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
dzn_wsi.c vulkan/wsi: Make get_blit_queue return a struct vk_queue * 2025-08-22 23:05:03 +00:00
meson.build vulkan: Optionally share one JSON manifest per driver between architectures 2025-11-24 19:05:57 +00:00