mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 13:50:11 +01:00
intel: Allow using intel_clc from the system
With -Dintel-clc=system, the build system will search for an `intel_clc` binary and use it instead of building `intel_clc` itself. This allows Intel Vulkan ray tracing support to be built when cross compiling without terrible hacks (that would otherwise be necessary due to `intel_clc`'s dependence on SPIRV-LLVM-Translator, libclc, clang, and LLVM). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24983>
This commit is contained in:
parent
5263802618
commit
28c1053c07
4 changed files with 12 additions and 6 deletions
|
|
@ -252,12 +252,11 @@ with_any_broadcom = [
|
||||||
].contains(true)
|
].contains(true)
|
||||||
|
|
||||||
if ['x86_64'].contains(host_machine.cpu_family())
|
if ['x86_64'].contains(host_machine.cpu_family())
|
||||||
with_intel_clc = get_option('intel-clc').enabled()
|
with_intel_clc = get_option('intel-clc') == 'enabled'
|
||||||
with_intel_vk_rt = with_intel_vk and with_intel_clc
|
|
||||||
else
|
else
|
||||||
with_intel_clc = false
|
with_intel_clc = false
|
||||||
with_intel_vk_rt = false
|
|
||||||
endif
|
endif
|
||||||
|
with_intel_vk_rt = with_intel_vk and get_option('intel-clc') != 'disabled'
|
||||||
|
|
||||||
with_any_intel = [
|
with_any_intel = [
|
||||||
with_gallium_crocus,
|
with_gallium_crocus,
|
||||||
|
|
|
||||||
|
|
@ -616,9 +616,12 @@ option(
|
||||||
|
|
||||||
option(
|
option(
|
||||||
'intel-clc',
|
'intel-clc',
|
||||||
type : 'feature',
|
type : 'combo',
|
||||||
deprecated: {'true': 'enabled', 'false': 'disabled'},
|
deprecated: {'true': 'enabled', 'false': 'disabled'},
|
||||||
value : 'disabled',
|
value : 'disabled',
|
||||||
|
choices : [
|
||||||
|
'enabled', 'disabled', 'system',
|
||||||
|
],
|
||||||
description : 'Build the intel-clc compiler (enables Vulkan Intel ' +
|
description : 'Build the intel-clc compiler (enables Vulkan Intel ' +
|
||||||
'Ray Tracing on supported hardware).'
|
'Ray Tracing on supported hardware).'
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,10 @@ libintel_compiler = static_library(
|
||||||
)
|
)
|
||||||
|
|
||||||
# For now this tool is only going to be used by Anv
|
# For now this tool is only going to be used by Anv
|
||||||
if with_intel_clc
|
if get_option('intel-clc') == 'system'
|
||||||
|
prog_intel_clc = find_program('intel_clc', native : true)
|
||||||
|
dep_prog_intel_clc = []
|
||||||
|
elif with_intel_clc
|
||||||
prog_intel_clc = executable(
|
prog_intel_clc = executable(
|
||||||
'intel_clc',
|
'intel_clc',
|
||||||
['intel_clc.c', 'brw_kernel.c'],
|
['intel_clc.c', 'brw_kernel.c'],
|
||||||
|
|
@ -182,6 +185,7 @@ if with_intel_clc
|
||||||
dependencies : [idep_nir, idep_vtn, idep_mesaclc, idep_mesautil, idep_intel_dev],
|
dependencies : [idep_nir, idep_vtn, idep_mesaclc, idep_mesautil, idep_intel_dev],
|
||||||
native : true,
|
native : true,
|
||||||
)
|
)
|
||||||
|
dep_prog_intel_clc = [prog_intel_clc]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if with_tests
|
if with_tests
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ foreach t : [['125', 'gfx125', 'dg2']]
|
||||||
# if fixed there
|
# if fixed there
|
||||||
],
|
],
|
||||||
env: ['MESA_SHADER_CACHE_DISABLE=true'],
|
env: ['MESA_SHADER_CACHE_DISABLE=true'],
|
||||||
depends : [prog_intel_clc]
|
depends : dep_prog_intel_clc
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue