mirror of https://gitlab.freedesktop.org/mesa/mesa
meson: rework intel-rt option to be a feature
This allows intel-rt to be turned on in cases where we're on x86_64 and we're building anv, but otherwise default to off, while still giving users the power to ignore those defaults if they want to. Because of the use of `feature.disable_if` this bumps the Meson requirement to 1.1. I can get rid of that, but it just makes for a lot more code than using the helper methods Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27645>
This commit is contained in:
parent
6a126b75e0
commit
876db91350
|
@ -23,7 +23,7 @@ project(
|
||||||
['c', 'cpp'],
|
['c', 'cpp'],
|
||||||
version : files('VERSION'),
|
version : files('VERSION'),
|
||||||
license : 'MIT',
|
license : 'MIT',
|
||||||
meson_version : '>= 0.60',
|
meson_version : '>= 1.1.0',
|
||||||
default_options : [
|
default_options : [
|
||||||
'buildtype=debugoptimized',
|
'buildtype=debugoptimized',
|
||||||
'b_ndebug=if-release',
|
'b_ndebug=if-release',
|
||||||
|
@ -303,8 +303,10 @@ else
|
||||||
with_intel_clc = false
|
with_intel_clc = false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
with_intel_vk_rt = ['x86_64'].contains(host_machine.cpu_family()) and \
|
with_intel_vk_rt = get_option('intel-rt') \
|
||||||
with_intel_vk and get_option('intel-rt') != 'disabled'
|
.disable_auto_if(not with_intel_vk) \
|
||||||
|
.disable_if(host_machine.cpu_family() != 'x86_64', error_message : 'Intel Ray Tracing is only supported on x86_64') \
|
||||||
|
.allowed()
|
||||||
|
|
||||||
with_any_intel = [
|
with_any_intel = [
|
||||||
with_gallium_crocus,
|
with_gallium_crocus,
|
||||||
|
|
|
@ -651,12 +651,8 @@ option(
|
||||||
|
|
||||||
option(
|
option(
|
||||||
'intel-rt',
|
'intel-rt',
|
||||||
type : 'combo',
|
type : 'feature',
|
||||||
deprecated: {'true': 'enabled', 'false': 'disabled'},
|
deprecated: {'true': 'enabled', 'false': 'disabled'},
|
||||||
value : 'disabled',
|
|
||||||
choices : [
|
|
||||||
'enabled', 'disabled',
|
|
||||||
],
|
|
||||||
description : 'Build Ray Tracing on supported hardware.'
|
description : 'Build Ray Tracing on supported hardware.'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue