mirror of https://gitlab.freedesktop.org/mesa/mesa
meson: use a feature option for dri3
This removes the deprecated 'true' and 'false' options, and uses a meson feature, requiring significantly less code. 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
643af2cf83
commit
8dcc1f8311
|
@ -193,7 +193,7 @@ Building the Code
|
|||
::
|
||||
|
||||
cd $TOP/mesa
|
||||
meson builddir --prefix=/usr --libdir=${LIBDIR} -Dgallium-drivers=svga -Dgallium-xa=true -Ddri3=false
|
||||
meson builddir --prefix=/usr --libdir=${LIBDIR} -Dgallium-drivers=svga -Dgallium-xa=true -Ddri3=disabled
|
||||
ninja -C builddir
|
||||
sudo ninja -C builddir install
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ Beware: Most Direct3D games are 32-bit, and thus need a 32-bit version of Mesa.
|
|||
|
||||
$ meson configure \
|
||||
-D gallium-nine=true \
|
||||
-D dri3=true \
|
||||
-D dri3=enabled \
|
||||
...
|
||||
|
||||
Paths
|
||||
|
|
14
meson.build
14
meson.build
|
@ -606,19 +606,7 @@ endif
|
|||
# GNU/Hurd includes egl_dri2, without drm.
|
||||
with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or
|
||||
host_machine.system() == 'gnu')
|
||||
_dri3 = get_option('dri3')
|
||||
if _dri3 == 'true'
|
||||
_dri3 = 'enabled'
|
||||
warning('dri3 option "true" deprecated, please use "enabled" instead.')
|
||||
elif _dri3 == 'false'
|
||||
_dri3 = 'disabled'
|
||||
warning('dri3 option "false" deprecated, please use "disabled" instead.')
|
||||
endif
|
||||
if _dri3 == 'auto'
|
||||
with_dri3 = system_has_kms_drm and with_dri2
|
||||
else
|
||||
with_dri3 = _dri3 == 'enabled'
|
||||
endif
|
||||
with_dri3 = get_option('dri3').disable_auto_if(not (system_has_kms_drm and with_dri2)).allowed()
|
||||
|
||||
if with_any_vk and (with_platform_x11 and not with_dri3)
|
||||
error('Vulkan drivers require dri3 for X11 support')
|
||||
|
|
|
@ -46,9 +46,7 @@ option(
|
|||
|
||||
option(
|
||||
'dri3',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['auto', 'true', 'false', 'disabled', 'enabled'],
|
||||
type : 'feature',
|
||||
description : 'enable support for dri3'
|
||||
)
|
||||
option(
|
||||
|
|
Loading…
Reference in New Issue