vulkan: refactor the runtime header gen order dependency

Summary:
- ensure headers used outside runtime are included in dependency source
- drop redundant idep_vulkan_common_entrypoints_h
- drop redundant icd side tricks for the order of header gen

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
This commit is contained in:
Yiwei Zhang 2024-03-07 20:21:00 -08:00 committed by Marge Bot
parent d857f10574
commit c9d3cc2615
5 changed files with 17 additions and 9 deletions

View file

@ -216,7 +216,6 @@ libvulkan_radeon = shared_library(
dep_valgrind, radv_deps, idep_aco,
idep_mesautil, idep_nir, idep_vulkan_util, idep_vulkan_wsi,
idep_vulkan_runtime, idep_amdgfxregs_h, idep_xmlconfig,
idep_vulkan_common_entrypoints_h
],
c_args : [no_override_init_args, radv_flags, c_msvc_compat_args],
cpp_args : [radv_flags, cpp_msvc_compat_args],

View file

@ -54,7 +54,7 @@ libv3dv_files = files(
'v3dv_queue.c',
'v3dv_uniforms.c',
'v3dv_wsi.c',
) + [v3d_xml_pack, vk_common_entrypoints[0]]
) + [v3d_xml_pack]
files_per_version = files(
'v3dvx_cmd_buffer.c',

View file

@ -32,7 +32,7 @@ liblvp_files = files(
'lvp_pipeline.c',
'lvp_pipeline_cache.c',
'lvp_query.c',
'lvp_wsi.c') + [vk_cmd_enqueue_entrypoints[0]]
'lvp_wsi.c')
lvp_deps = []
lvp_flags = []

View file

@ -49,7 +49,7 @@ libpanvk_files = files(
'panvk_query.c',
'panvk_shader.c',
'panvk_wsi.c',
) + [vk_cmd_enqueue_entrypoints[0], vk_common_entrypoints[0]]
)
panvk_deps = []
panvk_flags = []

View file

@ -186,10 +186,6 @@ vulkan_lite_runtime_files += [
vk_synchronization_helpers,
]
idep_vulkan_common_entrypoints_h = declare_dependency(
sources : [vk_common_entrypoints[0]]
)
# as a runtime library dep to ensure header gen order
vulkan_lite_runtime_header_gen_deps = declare_dependency(
sources : [
@ -225,8 +221,21 @@ libvulkan_lite_instance = static_library(
build_by_default : false,
)
# The sources part is to ensure those generated headers used externally are
# indeed generated before being compiled with, as long as either one of below
# is included as a dependency:
# - idep_vulkan_lite_runtime_headers
# - idep_vulkan_lite_runtime
# - idep_vulkan_runtime_headers
# - idep_vulkan_runtime
idep_vulkan_lite_runtime_headers = declare_dependency(
sources : [vk_cmd_queue[1], vk_physical_device_features[1], vk_physical_device_properties[1]],
sources : [
vk_cmd_enqueue_entrypoints[0],
vk_cmd_queue[1],
vk_common_entrypoints[0],
vk_physical_device_features[1],
vk_physical_device_properties[1],
],
include_directories : include_directories('.'),
)