clover: fix meson opencl-spirv option
As reported by https://gitlab.freedesktop.org/mesa/mesa/-/issues/10674
this option is broken. Indeed, when "with_clc" is false the compilation
process failed with the following error:
"ERROR: Unknown variable "idep_mesaclc".
Fixes: 815a6647eb
("meson: do not pull in clc for clover")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10674
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29646>
This commit is contained in:
@@ -335,7 +335,6 @@ if with_aco_tests and not with_amd_vk
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
with_microsoft_clc = get_option('microsoft-clc').enabled()
|
with_microsoft_clc = get_option('microsoft-clc').enabled()
|
||||||
with_clc = with_microsoft_clc or with_intel_clc or with_gallium_asahi
|
|
||||||
with_spirv_to_dxil = get_option('spirv-to-dxil')
|
with_spirv_to_dxil = get_option('spirv-to-dxil')
|
||||||
|
|
||||||
if host_machine.system() == 'darwin'
|
if host_machine.system() == 'darwin'
|
||||||
@@ -852,10 +851,11 @@ if with_gallium_rusticl
|
|||||||
|
|
||||||
add_languages('rust', required: true)
|
add_languages('rust', required: true)
|
||||||
rustc = meson.get_compiler('rust')
|
rustc = meson.get_compiler('rust')
|
||||||
|
|
||||||
with_clc = true
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
with_clover_spirv = with_gallium_opencl and get_option('opencl-spirv')
|
||||||
|
with_clc = with_microsoft_clc or with_intel_clc or with_gallium_asahi or with_gallium_rusticl or with_clover_spirv
|
||||||
|
|
||||||
dep_clc = null_dep
|
dep_clc = null_dep
|
||||||
if with_gallium_opencl or with_clc
|
if with_gallium_opencl or with_clc
|
||||||
dep_clc = dependency('libclc')
|
dep_clc = dependency('libclc')
|
||||||
@@ -1845,8 +1845,7 @@ pre_args += '-DLLVM_AVAILABLE=@0@'.format(with_llvm.to_int())
|
|||||||
pre_args += '-DDRAW_LLVM_AVAILABLE=@0@'.format((with_llvm and draw_with_llvm).to_int())
|
pre_args += '-DDRAW_LLVM_AVAILABLE=@0@'.format((with_llvm and draw_with_llvm).to_int())
|
||||||
pre_args += '-DAMD_LLVM_AVAILABLE=@0@'.format(amd_with_llvm.to_int())
|
pre_args += '-DAMD_LLVM_AVAILABLE=@0@'.format(amd_with_llvm.to_int())
|
||||||
|
|
||||||
with_opencl_spirv = (_opencl != 'disabled' and get_option('opencl-spirv')) or with_clc
|
if with_clover_spirv or with_clc
|
||||||
if with_opencl_spirv
|
|
||||||
chosen_llvm_version_array = dep_llvm.version().split('.')
|
chosen_llvm_version_array = dep_llvm.version().split('.')
|
||||||
chosen_llvm_version_major = chosen_llvm_version_array[0].to_int()
|
chosen_llvm_version_major = chosen_llvm_version_array[0].to_int()
|
||||||
chosen_llvm_version_minor = chosen_llvm_version_array[1].to_int()
|
chosen_llvm_version_minor = chosen_llvm_version_array[1].to_int()
|
||||||
|
@@ -44,7 +44,7 @@ if with_opencl_icd
|
|||||||
clover_cpp_args += '-DHAVE_CLOVER_ICD'
|
clover_cpp_args += '-DHAVE_CLOVER_ICD'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if with_opencl_spirv
|
if with_clover_spirv
|
||||||
clover_spirv_cpp_args += '-DHAVE_CLOVER_SPIRV'
|
clover_spirv_cpp_args += '-DHAVE_CLOVER_SPIRV'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ libclllvm = static_library(
|
|||||||
)
|
)
|
||||||
|
|
||||||
idep_opencl_spirv = null_dep
|
idep_opencl_spirv = null_dep
|
||||||
if with_opencl_spirv
|
if with_clover_spirv
|
||||||
libclspirv = static_library(
|
libclspirv = static_library(
|
||||||
'clspirv',
|
'clspirv',
|
||||||
files('spirv/invocation.cpp', 'spirv/invocation.hpp'),
|
files('spirv/invocation.cpp', 'spirv/invocation.hpp'),
|
||||||
|
Reference in New Issue
Block a user