mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 09:30:36 +02:00
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> (cherry picked from commit82e9880b04)
This commit is contained in:
parent
4e8e1b6bb6
commit
cb8eb3324d
3 changed files with 7 additions and 8 deletions
|
|
@ -624,7 +624,7 @@
|
|||
"description": "clover: fix meson opencl-spirv option",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "815a6647eb1383e9dc704ffcc266d85f3b13338a",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -335,7 +335,6 @@ if with_aco_tests and not with_amd_vk
|
|||
endif
|
||||
|
||||
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')
|
||||
|
||||
if host_machine.system() == 'darwin'
|
||||
|
|
@ -842,10 +841,11 @@ if with_gallium_rusticl
|
|||
|
||||
add_languages('rust', required: true)
|
||||
rustc = meson.get_compiler('rust')
|
||||
|
||||
with_clc = true
|
||||
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
|
||||
if with_gallium_opencl or with_clc
|
||||
dep_clc = dependency('libclc')
|
||||
|
|
@ -1828,8 +1828,7 @@ endif
|
|||
pre_args += '-DLLVM_AVAILABLE=' + (with_llvm ? '1' : '0')
|
||||
pre_args += '-DDRAW_LLVM_AVAILABLE=' + (with_llvm and draw_with_llvm ? '1' : '0')
|
||||
|
||||
with_opencl_spirv = (_opencl != 'disabled' and get_option('opencl-spirv')) or with_clc
|
||||
if with_opencl_spirv
|
||||
if with_clover_spirv or with_clc
|
||||
chosen_llvm_version_array = dep_llvm.version().split('.')
|
||||
chosen_llvm_version_major = chosen_llvm_version_array[0].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'
|
||||
endif
|
||||
|
||||
if with_opencl_spirv
|
||||
if with_clover_spirv
|
||||
clover_spirv_cpp_args += '-DHAVE_CLOVER_SPIRV'
|
||||
endif
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ libclllvm = static_library(
|
|||
)
|
||||
|
||||
idep_opencl_spirv = null_dep
|
||||
if with_opencl_spirv
|
||||
if with_clover_spirv
|
||||
libclspirv = static_library(
|
||||
'clspirv',
|
||||
files('spirv/invocation.cpp', 'spirv/invocation.hpp'),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue