diff options
author | Dylan Baker <dylan.c.baker@intel.com> | 2024-02-15 12:08:20 -0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-02-16 18:28:58 +0000 |
commit | 876db9135048be34d84bd74b18411678e15c7c3f (patch) | |
tree | 90e517a6417cbfce6b5d8d07889e7010dd0ffc32 /meson.build | |
parent | 6a126b75e0c93b9515258e7ae593b9670138e20f (diff) |
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>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/meson.build b/meson.build index c7c507dcca4..f86f412f364 100644 --- a/meson.build +++ b/meson.build @@ -23,7 +23,7 @@ project( ['c', 'cpp'], version : files('VERSION'), license : 'MIT', - meson_version : '>= 0.60', + meson_version : '>= 1.1.0', default_options : [ 'buildtype=debugoptimized', 'b_ndebug=if-release', @@ -303,8 +303,10 @@ else with_intel_clc = false endif -with_intel_vk_rt = ['x86_64'].contains(host_machine.cpu_family()) and \ - with_intel_vk and get_option('intel-rt') != 'disabled' +with_intel_vk_rt = get_option('intel-rt') \ + .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_gallium_crocus, |