mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
meson: only require glslang >= 12.2 when anv/radv/turnip are built
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37444>
This commit is contained in:
parent
de8c297e0b
commit
bbb76517ee
2 changed files with 11 additions and 8 deletions
|
|
@ -628,6 +628,7 @@ if with_gallium_d3d12 and not _with_gallium_d3d12_video.disabled()
|
|||
pre_args += '-DHAVE_GALLIUM_D3D12_VIDEO'
|
||||
endif
|
||||
|
||||
with_bvh = with_amd_vk or with_intel_vk or with_swrast_vk or with_freedreno_vk
|
||||
_glslang_preamble_version = '12.2'
|
||||
|
||||
# GLSL has interesting version output and Meson doesn't parse it correctly as of
|
||||
|
|
@ -635,7 +636,7 @@ _glslang_preamble_version = '12.2'
|
|||
prog_glslang = find_program(
|
||||
'glslangValidator',
|
||||
native : true,
|
||||
required : with_vulkan_overlay_layer or with_aco_tests or with_amd_vk or with_intel_vk or with_swrast_vk or with_freedreno_vk
|
||||
required : with_vulkan_overlay_layer or with_aco_tests or with_bvh
|
||||
)
|
||||
|
||||
if prog_glslang.found()
|
||||
|
|
@ -651,7 +652,7 @@ if prog_glslang.found()
|
|||
else
|
||||
glslang_depfile = []
|
||||
endif
|
||||
if _glslang_version.version_compare('< ' + _glslang_preamble_version)
|
||||
if with_bvh and _glslang_version.version_compare('< ' + _glslang_preamble_version)
|
||||
error('glslang >= ' + _glslang_preamble_version + ' is required.')
|
||||
endif
|
||||
if run_command(prog_glslang, [ '--quiet', '--version' ], check : false).returncode() == 0
|
||||
|
|
|
|||
|
|
@ -276,8 +276,14 @@ vulkan_runtime_deps = [
|
|||
]
|
||||
|
||||
if prog_glslang.found()
|
||||
if with_bvh
|
||||
subdir('radix_sort')
|
||||
vulkan_runtime_files += radix_sort_files
|
||||
vulkan_runtime_files += radix_sort_spv
|
||||
subdir('bvh')
|
||||
vulkan_runtime_files += files('vk_acceleration_structure.c')
|
||||
vulkan_runtime_files += bvh_spv
|
||||
endif
|
||||
vulkan_runtime_files += files('vk_texcompress_astc.c')
|
||||
vulkan_runtime_files += custom_target(
|
||||
'astc_spv.h',
|
||||
|
|
@ -289,10 +295,6 @@ if prog_glslang.found()
|
|||
],
|
||||
depfile : 'astc_spv.h.d',
|
||||
)
|
||||
vulkan_runtime_files += files('vk_acceleration_structure.c')
|
||||
vulkan_runtime_files += radix_sort_files
|
||||
vulkan_runtime_files += bvh_spv
|
||||
vulkan_runtime_files += radix_sort_spv
|
||||
endif
|
||||
|
||||
libvulkan_runtime = static_library(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue