meson: Introduce the legacy-x11 option
We're going to use this to hide support for excessively old or weird xserver environments. Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: David Heidelberg <david@ixit.cz> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29969>
This commit is contained in:
@@ -559,6 +559,8 @@ endif
|
|||||||
with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or with_dri_platform == 'apple')
|
with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or with_dri_platform == 'apple')
|
||||||
with_dri3 = get_option('dri3').disable_auto_if(not (system_has_kms_drm and with_dri2)).allowed()
|
with_dri3 = get_option('dri3').disable_auto_if(not (system_has_kms_drm and with_dri2)).allowed()
|
||||||
|
|
||||||
|
with_x11_dri2 = with_dri2 and get_option('legacy-x11').contains('dri2')
|
||||||
|
|
||||||
if with_any_vk and (with_platform_x11 and not with_dri3)
|
if with_any_vk and (with_platform_x11 and not with_dri3)
|
||||||
error('Vulkan drivers require dri3 for X11 support')
|
error('Vulkan drivers require dri3 for X11 support')
|
||||||
endif
|
endif
|
||||||
@@ -2127,13 +2129,13 @@ if with_platform_x11
|
|||||||
pre_args += '-DXCB_KEYSYMS_AVAILABLE'
|
pre_args += '-DXCB_KEYSYMS_AVAILABLE'
|
||||||
endif
|
endif
|
||||||
dep_x11_xcb = dependency('x11-xcb')
|
dep_x11_xcb = dependency('x11-xcb')
|
||||||
dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
|
dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8', required : with_x11_dri2)
|
||||||
if with_dri_platform == 'drm' and not dep_libdrm.found()
|
if with_dri_platform == 'drm' and not dep_libdrm.found()
|
||||||
error('libdrm required for gallium video statetrackers when using x11')
|
error('libdrm required for gallium video statetrackers when using x11')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if with_any_vk or with_egl or (with_glx == 'dri' and with_dri_platform == 'drm')
|
if with_any_vk or with_egl or (with_glx == 'dri' and with_dri_platform == 'drm')
|
||||||
dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
|
dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8', required : with_x11_dri2)
|
||||||
|
|
||||||
if with_dri3
|
if with_dri3
|
||||||
dep_xcb_dri3 = dependency('xcb-dri3')
|
dep_xcb_dri3 = dependency('xcb-dri3')
|
||||||
@@ -2183,6 +2185,9 @@ endif
|
|||||||
if with_dri2
|
if with_dri2
|
||||||
pre_args += '-DHAVE_DRI2'
|
pre_args += '-DHAVE_DRI2'
|
||||||
endif
|
endif
|
||||||
|
if with_x11_dri2
|
||||||
|
pre_args += '-DHAVE_X11_DRI2'
|
||||||
|
endif
|
||||||
if with_dri3
|
if with_dri3
|
||||||
pre_args += '-DHAVE_DRI3'
|
pre_args += '-DHAVE_DRI3'
|
||||||
endif
|
endif
|
||||||
|
@@ -747,3 +747,13 @@ option(
|
|||||||
'the default driconf file is hardcoded into Mesa. ' +
|
'the default driconf file is hardcoded into Mesa. ' +
|
||||||
'Requires expat.'
|
'Requires expat.'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
option(
|
||||||
|
'legacy-x11',
|
||||||
|
type : 'array',
|
||||||
|
value : ['none'],
|
||||||
|
description : 'Build legacy X11 support features.',
|
||||||
|
choices : [
|
||||||
|
'none', 'dri2'
|
||||||
|
],
|
||||||
|
)
|
||||||
|
Reference in New Issue
Block a user