mesa/src/vulkan/util
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
..
gen_enum_to_str.py meson: remove '--outdir' argument in script 2025-10-08 20:51:20 +00:00
meson.build meson: add vk_enum_defines.h to idep_vulkan_util_headers 2025-10-09 14:47:11 +00:00
vk_alloc.c vulkan/util: assume c11 2022-06-14 15:08:37 +00:00
vk_alloc.h vulkan/util: add vk_realloc2 2025-07-08 20:22:13 +00:00
vk_cmd_queue_gen.py vulkan/cmd_queue: Free all elements of struct arrays 2025-10-21 19:50:47 +02:00
vk_dispatch_table_gen.py build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
vk_dispatch_trampolines_gen.py mesa/vulkan: use a simpler path for header in trampoline gen 2024-01-18 18:45:40 +00:00
vk_entrypoints.py vulkan: write beta extensions into generator scripts. 2023-05-04 02:40:06 +00:00
vk_entrypoints_gen.py vk_entrypoints_gen: Apply hidden visibility to generated symbols 2024-07-05 14:40:39 +00:00
vk_extensions.py vulkan: update ALLOWED_ANDROID_VERSION for api level 35 2025-03-14 18:39:07 +00:00
vk_extensions_gen.py vulkan/util: drop redundant code gen from vk_extensions_gen.py 2024-02-01 19:29:48 +00:00
vk_format.c vulkan/format: Map VK_EXT_ycbcr_2plane_444_formats to pipe format 2025-09-08 11:59:36 +00:00
vk_format.h vulkan/util: Add a vk_format_srgb_to_linear() helper 2025-10-27 16:19:43 -04:00
vk_icd_gen.py vulkan: Optionally share one JSON manifest per driver between architectures 2025-11-24 19:05:57 +00:00
vk_internal_exts.h radv,vulkan: replace VK_RENDERING_INPUT_ATTACHMENT_NO_CONCURRENT_WRITES_BIT_MESA 2025-10-31 07:51:23 +00:00
vk_physical_device_features_gen.py vulkan/util: update pd feature codegen to use platform guards 2025-08-12 18:12:50 +00:00
vk_physical_device_properties_gen.py vulkan/util: drop workaround for ANB struct 2025-09-26 14:02:53 +00:00
vk_physical_device_spirv_caps_gen.py vulkan: stop excluding Shader64BitIndexingEXT SPIR-V cap 2025-11-20 15:44:04 +00:00
vk_struct_type_cast_gen.py meson: remove '--outdir' argument in script 2025-10-08 20:51:20 +00:00
vk_synchronization_helpers_gen.py vulkan: Handle group stages in vk_.*_access2_for_pipeline_stage_flags2 2024-06-28 10:41:49 +00:00
vk_util.c mesa: replace most occurrences of getenv() with os_get_option() 2025-11-06 04:36:13 +00:00
vk_util.h util: move typed_memcpy into macros.h 2025-09-05 20:01:00 +00:00