mirror of https://gitlab.freedesktop.org/mesa/mesa
meson: use a feature option for gallium-xa
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
This commit is contained in:
parent
6f66b89ac3
commit
b200d547dc
|
@ -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
|
||||
|
||||
|
|
28
meson.build
28
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 == ''
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue