meson: add a new option to enable intel-clc without building RT shaders

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26797>
This commit is contained in:
Lionel Landwerlin
2023-11-06 11:10:23 +02:00
committed by Marge Bot
parent c53a4711cb
commit 012489e55c
2 changed files with 22 additions and 8 deletions

View File

@@ -295,14 +295,18 @@ with_any_broadcom = [
with_broadcom_vk, with_broadcom_vk,
].contains(true) ].contains(true)
if ['x86_64'].contains(host_machine.cpu_family()) if ['x86_64'].contains(host_machine.cpu_family()) and \
get_option('intel-clc') != 'system'
# Require intel-clc with Anv & Iris (for internal shaders)
with_intel_clc = get_option('intel-clc') == 'enabled' with_intel_clc = get_option('intel-clc') == 'enabled'
with_intel_vk_rt = with_intel_vk and get_option('intel-clc') != 'disabled'
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' and \
get_option('intel-rt') != 'disabled'
with_any_intel = [ with_any_intel = [
with_gallium_crocus, with_gallium_crocus,
with_gallium_i915, with_gallium_i915,
@@ -601,7 +605,7 @@ _vdpau_drivers = [
vdpau = get_option('gallium-vdpau') \ vdpau = get_option('gallium-vdpau') \
.require(system_has_kms_drm, error_message : 'VDPAU state tracker can only be build on unix-like OSes.') \ .require(system_has_kms_drm, error_message : 'VDPAU state tracker can only be build on unix-like OSes.') \
.require(with_platform_x11, error_message : 'VDPAU state tracker requires X11 support.') \ .require(with_platform_x11, error_message : 'VDPAU state tracker requires X11 support.') \
.require(_vdpau_drivers.contains(true), error_message : 'VDPAU state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video, virgl).') .require(_vdpau_drivers.contains(true), error_message : 'VDPAU state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video, virgl).')
dep_vdpau = dependency('vdpau', version : '>= 1.1', required : vdpau) dep_vdpau = dependency('vdpau', version : '>= 1.1', required : vdpau)
if dep_vdpau.found() if dep_vdpau.found()
@@ -949,7 +953,7 @@ endif
with_shader_cache = get_option('shader-cache') \ with_shader_cache = get_option('shader-cache') \
.require(host_machine.system() != 'windows', error_message : 'Shader Cache does not currently work on Windows') \ .require(host_machine.system() != 'windows', error_message : 'Shader Cache does not currently work on Windows') \
.allowed() .allowed()
if with_shader_cache if with_shader_cache
pre_args += '-DENABLE_SHADER_CACHE' pre_args += '-DENABLE_SHADER_CACHE'
@@ -1597,7 +1601,7 @@ use_xmlconfig = get_option('xmlconfig') \
.require(dep_expat.found(), .require(dep_expat.found(),
error_message : 'requires expat') \ error_message : 'requires expat') \
.allowed() .allowed()
# Predefined macros for windows # Predefined macros for windows
if host_machine.system() == 'windows' if host_machine.system() == 'windows'
pre_args += '-DWIN32_LEAN_AND_MEAN' # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx pre_args += '-DWIN32_LEAN_AND_MEAN' # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx

View File

@@ -639,8 +639,18 @@ option(
choices : [ choices : [
'enabled', 'disabled', 'system', 'enabled', 'disabled', 'system',
], ],
description : 'Build the intel-clc compiler (enables Vulkan Intel ' + description : 'Build the intel-clc compiler.'
'Ray Tracing on supported hardware).' )
option(
'intel-rt',
type : 'combo',
deprecated: {'true': 'enabled', 'false': 'disabled'},
value : 'disabled',
choices : [
'enabled', 'disabled',
],
description : 'Build Ray Tracing on supported hardware.'
) )
option( option(