diff options
| author | Eric Engestrom <eric@igalia.com> | 2025-09-17 16:51:27 +0200 |
|---|---|---|
| committer | Marge Bot <marge-bot@fdo.invalid> | 2025-09-18 19:07:10 +0000 |
| commit | de8c297e0b8bc9973b9740e684b232dca176c108 (patch) | |
| tree | aad493cbaf8a618fcf59b20881cd9d85d9ee56bb /meson.build | |
| parent | f65fbb23e2f664cacf28a9508e4cd4273e88cd14 (diff) | |
meson: require glslang >= 12.2 for bvh preample
Fixes: ea51a679968b2c355e82 ("vulkan/bvh: Enable glsl extensions in meson")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37444>
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 872ba3be69c..2222f245a43 100644 --- a/meson.build +++ b/meson.build @@ -628,6 +628,8 @@ if with_gallium_d3d12 and not _with_gallium_d3d12_video.disabled() pre_args += '-DHAVE_GALLIUM_D3D12_VIDEO' endif +_glslang_preamble_version = '12.2' + # GLSL has interesting version output and Meson doesn't parse it correctly as of # Meson 1.4.0 prog_glslang = find_program( @@ -637,17 +639,21 @@ prog_glslang = find_program( ) if prog_glslang.found() + _glslang_version = run_command(prog_glslang, ['--version'], check : false).stdout().split(':')[2] # Check if glslang has depfile support. Support was added in 11.3.0, but # Windows path support was broken until 11.9.0. # # It is intentional to check the build machine, since we need to ensure that # glslang will output valid paths on the build platform _glslang_check = build_machine.system() == 'windows' ? '>= 11.9.0' : '>= 11.3.0' - if run_command(prog_glslang, ['--version'], check : false).stdout().split(':')[2].version_compare(_glslang_check) + if _glslang_version.version_compare(_glslang_check) glslang_depfile = ['--depfile', '@DEPFILE@'] else glslang_depfile = [] endif + if _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 glslang_quiet = ['--quiet'] else |