glx: include: meson_options.txt: Allow disabling DRI glx backends

This allows building the X server with glx and without mesa.
This also makes the X server optionally no longer be a loader for dri drivers.

Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1638
Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1819

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
stefan11111
2025-12-14 01:25:14 +02:00
committed by Enrico Weigelt
parent 972d57d5da
commit 63f2422475
9 changed files with 37 additions and 11 deletions

View File

@@ -272,7 +272,12 @@ glxClientCallback(CallbackListPtr *list, void *closure, void *data)
/************************************************************************/
static __GLXprovider *__glXProviderStack = &__glXDRISWRastProvider;
static __GLXprovider *__glXProviderStack =
#ifdef BUILD_GLX_DRI
&__glXDRISWRastProvider;
#else
NULL;
#endif
void
GlxPushProvider(__GLXprovider * provider)

View File

@@ -13,8 +13,6 @@ srcs_glx = [
'glxcmds.c',
'glxcmdsswap.c',
'glxext.c',
'glxdriswrast.c',
'glxdricommon.c',
'glxscreens.c',
'render2.c',
'render2swap.c',
@@ -30,6 +28,16 @@ srcs_glx = [
'xfont.c',
]
srcs_glxdri2 = []
if build_glx_dri
srcs_glx += 'glx_dri/glxdriswrast.c'
srcs_glx += 'glx_dri/glxdricommon.c'
if build_dri2 or build_dri3
srcs_glxdri2 = files('glx_dri/glxdri2.c')
endif
endif
libxserver_glx = []
if build_glx
libxserver_glx = static_library('xserver_glx',
@@ -50,11 +58,6 @@ if build_glx
)
endif
srcs_glxdri2 = []
if build_dri2 or build_dri3
srcs_glxdri2 = files('glxdri2.c')
endif
srcs_vnd = [
'vndcmds.c',
'vndext.c',