summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/drivers/svga3d.rst2
-rw-r--r--meson.build28
-rw-r--r--meson_options.txt4
3 files changed, 7 insertions, 27 deletions
diff --git a/docs/drivers/svga3d.rst b/docs/drivers/svga3d.rst
index 6374511aec5..3731188a275 100644
--- a/docs/drivers/svga3d.rst
+++ b/docs/drivers/svga3d.rst
@@ -193,7 +193,7 @@ Building the Code
::
cd $TOP/mesa
- meson builddir --prefix=/usr --libdir=${LIBDIR} -Dgallium-drivers=svga -Dgallium-xa=true -Ddri3=disabled
+ meson builddir --prefix=/usr --libdir=${LIBDIR} -Dgallium-drivers=svga -Dgallium-xa=enabled -Ddri3=disabled
ninja -C builddir
sudo ninja -C builddir install
diff --git a/meson.build b/meson.build
index 2aa7e7bc011..4d631ab1b8d 100644
--- a/meson.build
+++ b/meson.build
@@ -783,29 +783,11 @@ if va_drivers_path == ''
va_drivers_path = join_paths(get_option('libdir'), 'dri')
endif
-_xa = get_option('gallium-xa')
-if _xa == 'true'
- _xa = 'enabled'
- warning('gallium-xa option "true" deprecated, please use "enabled" instead.')
-elif _xa == 'false'
- _xa = 'disabled'
- warning('gallium-xa option "false" deprecated, please use "disabled" instead.')
-endif
-if not system_has_kms_drm
- if _xa == 'enabled'
- error('XA state tracker can only be built on unix-like OSes.')
- else
- _xa = 'disabled'
- endif
-elif not (with_gallium_nouveau or with_gallium_freedreno or with_gallium_i915
- or with_gallium_svga)
- if _xa == 'enabled'
- error('XA state tracker requires at least one of the following gallium drivers: nouveau, freedreno, i915, svga.')
- else
- _xa = 'disabled'
- endif
-endif
-with_gallium_xa = _xa != 'disabled'
+with_gallium_xa = get_option('gallium-xa') \
+ .require(system_has_kms_drm, error_message : 'XA state tracker can only be built on unix-like OSes.') \
+ .require(with_gallium_nouveau or with_gallium_freedreno or with_gallium_i915 or with_gallium_svga,
+ error_message : 'XA state tracker requires at least one of the following gallium drivers: nouveau, freedreno, i915, svga.') \
+ .allowed()
d3d_drivers_path = get_option('d3d-drivers-path')
if d3d_drivers_path == ''
diff --git a/meson_options.txt b/meson_options.txt
index 74713614821..8976c0d70e5 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -120,9 +120,7 @@ option(
)
option(
'gallium-xa',
- type : 'combo',
- value : 'auto',
- choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
+ type : 'feature',
description : 'enable gallium xa frontend.',
)
option(