From bbb76517eea2bdc506df62d54c48b1e53277b8bf Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Wed, 17 Sep 2025 17:08:19 +0200 Subject: [PATCH] meson: only require glslang >= 12.2 when anv/radv/turnip are built Part-of: --- meson.build | 5 +++-- src/vulkan/runtime/meson.build | 14 ++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 2222f245a43..89ca6e20fa4 100644 --- a/meson.build +++ b/meson.build @@ -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 diff --git a/src/vulkan/runtime/meson.build b/src/vulkan/runtime/meson.build index 9d34ae432f0..3b830a75213 100644 --- a/src/vulkan/runtime/meson.build +++ b/src/vulkan/runtime/meson.build @@ -276,8 +276,14 @@ vulkan_runtime_deps = [ ] if prog_glslang.found() - subdir('radix_sort') - subdir('bvh') + 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(