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:
@@ -193,7 +193,7 @@ Building the Code
|
|||||||
::
|
::
|
||||||
|
|
||||||
cd $TOP/mesa
|
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
|
ninja -C builddir
|
||||||
sudo ninja -C builddir install
|
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')
|
va_drivers_path = join_paths(get_option('libdir'), 'dri')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
_xa = get_option('gallium-xa')
|
with_gallium_xa = get_option('gallium-xa') \
|
||||||
if _xa == 'true'
|
.require(system_has_kms_drm, error_message : 'XA state tracker can only be built on unix-like OSes.') \
|
||||||
_xa = 'enabled'
|
.require(with_gallium_nouveau or with_gallium_freedreno or with_gallium_i915 or with_gallium_svga,
|
||||||
warning('gallium-xa option "true" deprecated, please use "enabled" instead.')
|
error_message : 'XA state tracker requires at least one of the following gallium drivers: nouveau, freedreno, i915, svga.') \
|
||||||
elif _xa == 'false'
|
.allowed()
|
||||||
_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'
|
|
||||||
|
|
||||||
d3d_drivers_path = get_option('d3d-drivers-path')
|
d3d_drivers_path = get_option('d3d-drivers-path')
|
||||||
if d3d_drivers_path == ''
|
if d3d_drivers_path == ''
|
||||||
|
@@ -120,9 +120,7 @@ option(
|
|||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'gallium-xa',
|
'gallium-xa',
|
||||||
type : 'combo',
|
type : 'feature',
|
||||||
value : 'auto',
|
|
||||||
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
|
||||||
description : 'enable gallium xa frontend.',
|
description : 'enable gallium xa frontend.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
|
Reference in New Issue
Block a user