mesa/src/intel/vulkan_hasvk
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
..
layers
tests hasvk/tests: Propagate failures to gtest 2023-08-25 12:08:29 -07:00
anv_allocator.c treewide: use UTIL_DYNARRAY_INIT 2025-11-04 13:39:48 +00:00
anv_android.c hasvk: Remove special CROS_GRALLOC path from format logic 2025-08-22 23:40:32 +00:00
anv_android.h hasvk: refactor to use DETECT_OS_ANDROID instead of ANDROID 2024-02-01 19:29:49 +00:00
anv_android_stubs.c
anv_batch_chain.c hasvk: Switch to util/cache_ops.h 2025-10-16 01:19:44 +00:00
anv_blorp.c anv, hasvk: allow using a 3D image as a resolve target 2025-08-21 20:53:42 +00:00
anv_cmd_buffer.c treewide: Replace calling to function ALIGN with align 2025-11-12 21:58:40 +00:00
anv_descriptor_set.c treewide: Replace calling to function ALIGN with align 2025-11-12 21:58:40 +00:00
anv_device.c hasvk: don't report custom sample locations for sample count 1 2025-10-16 14:48:06 +00:00
anv_formats.c docs: update/fix vk spec urls 2025-10-22 09:23:34 +02:00
anv_gem.c intel: Move intel_define.h to i915/intel_define.h 2024-02-21 18:10:54 +00:00
anv_gem_stubs.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
anv_genX.h intel: move deref_block_size to intel_urb_config 2025-08-01 11:35:05 +00:00
anv_image.c anv, hasvk: Don't assert on alignment if the value is known to be zero 2025-10-31 22:18:50 +00:00
anv_measure.c hasvk: move cmd_emit_timestamp initialization to genX 2024-07-03 21:10:13 +00:00
anv_measure.h
anv_nir.h anv: Remove NIR_PASS_V usage 2025-07-14 19:25:52 +00:00
anv_nir_apply_pipeline_layout.c nir: remove manual nir_load_global_constant 2025-10-21 12:39:53 +02:00
anv_nir_compute_push_layout.c treewide: Replace calling to function ALIGN with align 2025-11-12 21:58:40 +00:00
anv_nir_lower_multiview.c treewide: add & use parent instr helpers 2025-11-12 21:22:13 +00:00
anv_nir_lower_ubo_loads.c treewide: use nir_load_global_constant alias of nir_build_load_global_constant 2025-10-21 12:39:53 +02:00
anv_nir_lower_ycbcr_textures.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
anv_perf.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
anv_pipeline.c nir: Prepare nir_lower_io_vars_to_temporaries() for optional PLS lowering 2025-11-18 20:25:42 +00:00
anv_pipeline_cache.c intel: Move intel_shader_reloc to common code and drop elk_shader_reloc 2025-10-09 07:01:46 +00:00
anv_private.h intel: do not NIH util_is_aligned 2025-10-31 15:03:57 +00:00
anv_queue.c
anv_util.c
anv_utrace.c u_trace: pass tracepoint flags to the read_timestamp callback 2025-02-24 08:08:02 +00:00
anv_wsi.c hasvk: Switch to util/cache_ops.h 2025-10-16 01:19:44 +00:00
genX_blorp_exec.c intel: Use _brw suffix for genX headers that rely on brw 2024-02-24 00:24:32 +00:00
genX_cmd_buffer.c treewide: Replace calling to function ALIGN with align 2025-11-12 21:58:40 +00:00
genX_gpu_memcpy.c intel: move deref_block_size to intel_urb_config 2025-08-01 11:35:05 +00:00
genX_pipeline.c treewide: Replace calling to function ALIGN with align 2025-11-12 21:58:40 +00:00
genX_query.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
genX_state.c hasvk: don't report custom sample locations for sample count 1 2025-10-16 14:48:06 +00:00
gfx7_cmd_buffer.c vulkan: rename depth bias graphics states 2024-12-06 13:48:26 -05:00
gfx8_cmd_buffer.c hasvk: Pre-plumbing needed for VK_KHR_maintenance5 2025-03-31 16:56:13 +00:00
meson.build vulkan: Optionally share one JSON manifest per driver between architectures 2025-11-24 19:05:57 +00:00