meson: Tell glslang to be quiet.

Without --quiet glslang unconditionally prints the input file name to stdout.
Check if --quiet is supported because some distros only have ancient glslang
versions.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16312>
This commit is contained in:
Georg Lehmann 2022-05-03 21:57:23 +02:00 committed by Marge Bot
parent 1b639a0ce5
commit bf6372df62
3 changed files with 7 additions and 2 deletions

View File

@ -687,6 +687,11 @@ endif
if with_vulkan_overlay_layer or with_aco_tests or with_amd_vk
prog_glslang = find_program('glslangValidator')
if run_command(prog_glslang, [ '--quiet', '--version' ], check : false).returncode() == 0
glslang_quiet = ['--quiet']
else
glslang_quiet = []
endif
endif
_xvmc = get_option('gallium-xvmc')

View File

@ -46,6 +46,6 @@ foreach s : radix_sort_shaders
s + '.spv.h',
input : s,
output : s + '.spv.h',
command : [prog_glslang, '-V', '-I' + shader_include_dir, '--target-env', 'spirv1.3', '-x', '-o', '@OUTPUT@', '@INPUT@'],
command : [prog_glslang, '-V', '-I' + shader_include_dir, '--target-env', 'spirv1.3', '-x', '-o', '@OUTPUT@', '@INPUT@'] + glslang_quiet,
depend_files: shader_include_files)
endforeach

View File

@ -26,7 +26,7 @@ overlay_spv = []
foreach s : ['overlay.frag', 'overlay.vert']
overlay_spv += custom_target(
s + '.spv.h', input : s, output : s + '.spv.h',
command : [prog_glslang, '-V', '-x', '-o', '@OUTPUT@', '@INPUT@'])
command : [prog_glslang, '-V', '-x', '-o', '@OUTPUT@', '@INPUT@'] + glslang_quiet)
endforeach
vklayer_files = files(