xwayland/glamor: Drop the EGLStream backend
Now that the NVIDIA proprietary driver has grown support for GBM, the EGLStream backend for NVIDIA GPUs is now superseded by the standard GBM backend in Xwayland. This code path is therefore not used and hardly ever tested. Remove support for EGLStream in Xwayland. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
This commit is contained in:
parent
005912d82f
commit
701284f057
|
@ -54,13 +54,6 @@ support (optional).
|
|||
|
||||
This option is not compatible with rootless mode (\fI-rootless\fP).
|
||||
.TP 8
|
||||
.B \-eglstream
|
||||
Use EGLStream backend for NVidia GPUs. If \fIXwayland\fP was compiled with
|
||||
EGLStream support, this option will instruct \fIXwayland\fP to try that
|
||||
backend first, then fallback to the GBM backend if EGLStream is not supported
|
||||
by the Wayland server. Without this option, \fIXwayland\fP tries the GBM
|
||||
backend first, and fallback to EGLStream if GBM is not usable.
|
||||
.TP 8
|
||||
.B \-enable-ei-portal
|
||||
Enable support for the XDG portal for input emulation.
|
||||
|
||||
|
|
|
@ -102,30 +102,14 @@ if build_ei
|
|||
endif
|
||||
|
||||
xwayland_glamor = []
|
||||
eglstream_srcs = []
|
||||
if build_xwayland_glamor
|
||||
srcs += [
|
||||
'xwayland-glamor.c',
|
||||
'xwayland-dmabuf.h',
|
||||
'xwayland-dmabuf.c'
|
||||
'xwayland-dmabuf.c',
|
||||
'xwayland-glamor-gbm.c'
|
||||
]
|
||||
if gbm_dep.found()
|
||||
srcs += [
|
||||
'xwayland-glamor-gbm.c',
|
||||
]
|
||||
endif
|
||||
if build_eglstream
|
||||
eglstream_protodir = eglstream_dep.get_variable(pkgconfig : 'pkgdatadir')
|
||||
eglstream_xml = join_paths(eglstream_protodir, 'wayland-eglstream.xml')
|
||||
eglstream_controller_xml = join_paths(eglstream_protodir, 'wayland-eglstream-controller.xml')
|
||||
|
||||
srcs += client_header.process(eglstream_xml)
|
||||
srcs += client_header.process(eglstream_controller_xml)
|
||||
srcs += code.process(eglstream_xml)
|
||||
srcs += code.process(eglstream_controller_xml)
|
||||
|
||||
srcs += 'xwayland-glamor-eglstream.c'
|
||||
endif
|
||||
if build_xv
|
||||
srcs += 'xwayland-glamor-xv.c'
|
||||
endif
|
||||
|
@ -176,7 +160,7 @@ xwayland_server = executable(
|
|||
xwayland_vars = [
|
||||
'have_glamor=' + build_glamor.to_string(),
|
||||
'have_glamor_api=' + build_glamor.to_string(),
|
||||
'have_eglstream=' + build_eglstream.to_string(),
|
||||
'have_eglstream=false',
|
||||
'have_initfd=true',
|
||||
'have_listenfd=true',
|
||||
'have_verbose=true',
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -116,13 +116,6 @@ xwl_glamor_init_wl_registry(struct xwl_screen *xwl_screen,
|
|||
interface,
|
||||
version)) {
|
||||
/* no-op */
|
||||
} else if (xwl_screen->eglstream_backend.is_available &&
|
||||
xwl_screen->eglstream_backend.init_wl_registry(xwl_screen,
|
||||
registry,
|
||||
id,
|
||||
interface,
|
||||
version)) {
|
||||
/* no-op */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -348,17 +341,12 @@ xwl_glamor_create_pixmap_for_window(struct xwl_window *xwl_window)
|
|||
}
|
||||
|
||||
void
|
||||
xwl_glamor_init_backends(struct xwl_screen *xwl_screen, Bool use_eglstream)
|
||||
xwl_glamor_init_backends(struct xwl_screen *xwl_screen)
|
||||
{
|
||||
#ifdef GLAMOR_HAS_GBM
|
||||
xwl_glamor_init_gbm(xwl_screen);
|
||||
if (!xwl_screen->gbm_backend.is_available && !use_eglstream)
|
||||
ErrorF("Xwayland glamor: GBM backend (default) is not available\n");
|
||||
#endif
|
||||
#ifdef XWL_HAS_EGLSTREAM
|
||||
xwl_glamor_init_eglstream(xwl_screen);
|
||||
if (!xwl_screen->eglstream_backend.is_available && use_eglstream)
|
||||
ErrorF("Xwayland glamor: EGLStream backend requested but not available\n");
|
||||
if (!xwl_screen->gbm_backend.is_available)
|
||||
ErrorF("Xwayland glamor: GBM backend is not available\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -380,32 +368,11 @@ xwl_glamor_select_gbm_backend(struct xwl_screen *xwl_screen)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
xwl_glamor_select_eglstream_backend(struct xwl_screen *xwl_screen)
|
||||
{
|
||||
#ifdef XWL_HAS_EGLSTREAM
|
||||
if (xwl_screen->eglstream_backend.is_available &&
|
||||
xwl_glamor_has_wl_interfaces(xwl_screen, &xwl_screen->eglstream_backend)) {
|
||||
xwl_screen->egl_backend = &xwl_screen->eglstream_backend;
|
||||
LogMessageVerb(X_INFO, 3, "glamor: Using EGLStream backend\n");
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
LogMessageVerb(X_INFO, 3,
|
||||
"Missing Wayland requirements for glamor EGLStream backend\n");
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
xwl_glamor_select_backend(struct xwl_screen *xwl_screen, Bool use_eglstream)
|
||||
xwl_glamor_select_backend(struct xwl_screen *xwl_screen)
|
||||
{
|
||||
if (!xwl_glamor_select_eglstream_backend(xwl_screen)) {
|
||||
if (!use_eglstream)
|
||||
xwl_glamor_select_gbm_backend(xwl_screen);
|
||||
}
|
||||
}
|
||||
|
||||
Bool
|
||||
xwl_glamor_init(struct xwl_screen *xwl_screen)
|
||||
|
|
|
@ -118,10 +118,8 @@ struct xwl_egl_backend {
|
|||
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
|
||||
void xwl_glamor_init_backends(struct xwl_screen *xwl_screen,
|
||||
Bool use_eglstream);
|
||||
void xwl_glamor_select_backend(struct xwl_screen *xwl_screen,
|
||||
Bool use_eglstream);
|
||||
void xwl_glamor_init_backends(struct xwl_screen *xwl_screen);
|
||||
void xwl_glamor_select_backend(struct xwl_screen *xwl_screen);
|
||||
Bool xwl_glamor_init(struct xwl_screen *xwl_screen);
|
||||
|
||||
Bool xwl_screen_set_drm_interface(struct xwl_screen *xwl_screen,
|
||||
|
@ -147,22 +145,8 @@ PixmapPtr xwl_glamor_create_pixmap_for_window (struct xwl_window *xwl_window);
|
|||
Bool xwl_glamor_xv_init(ScreenPtr pScreen);
|
||||
#endif /* XV */
|
||||
|
||||
void xwl_glamor_init_gbm(struct xwl_screen *xwl_screen);
|
||||
|
||||
#endif /* XWL_HAS_GLAMOR */
|
||||
|
||||
#ifdef GLAMOR_HAS_GBM
|
||||
void xwl_glamor_init_gbm(struct xwl_screen *xwl_screen);
|
||||
#else
|
||||
static inline void xwl_glamor_init_gbm(struct xwl_screen *xwl_screen)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef XWL_HAS_EGLSTREAM
|
||||
void xwl_glamor_init_eglstream(struct xwl_screen *xwl_screen);
|
||||
#else
|
||||
static inline void xwl_glamor_init_eglstream(struct xwl_screen *xwl_screen)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* XWAYLAND_GLAMOR_H */
|
||||
|
|
|
@ -758,9 +758,6 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
|||
int ret, bpc, green_bpc, i;
|
||||
unsigned int xwl_width = 640;
|
||||
unsigned int xwl_height = 480;
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
Bool use_eglstreams = FALSE;
|
||||
#endif
|
||||
Bool use_fixed_size = FALSE;
|
||||
|
||||
if (!dixRegisterPrivateKey(&xwl_screen_private_key, PRIVATE_SCREEN, 0))
|
||||
|
@ -813,13 +810,6 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
|||
else if (strcmp(argv[i], "-shm") == 0) {
|
||||
xwl_screen->glamor = XWL_GLAMOR_NONE;
|
||||
}
|
||||
else if (strcmp(argv[i], "-eglstream") == 0) {
|
||||
#ifdef XWL_HAS_EGLSTREAM
|
||||
use_eglstreams = TRUE;
|
||||
#else
|
||||
ErrorF("Xwayland glamor: this build does not have EGLStream support\n");
|
||||
#endif
|
||||
}
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
else if (strcmp(argv[i], "-glamor") == 0) {
|
||||
if (strncmp(argv[i + 1], "es", 2) == 0)
|
||||
|
@ -885,7 +875,7 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
|||
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
if (xwl_screen->glamor)
|
||||
xwl_glamor_init_backends(xwl_screen, use_eglstreams);
|
||||
xwl_glamor_init_backends(xwl_screen);
|
||||
#endif
|
||||
|
||||
/* In rootless mode, we don't have any screen storage, and the only
|
||||
|
@ -1008,7 +998,7 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
|||
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
if (xwl_screen->glamor) {
|
||||
xwl_glamor_select_backend(xwl_screen, use_eglstreams);
|
||||
xwl_glamor_select_backend(xwl_screen);
|
||||
|
||||
if (xwl_screen->egl_backend == NULL || !xwl_glamor_init(xwl_screen)) {
|
||||
ErrorF("Failed to initialize glamor, falling back to sw\n");
|
||||
|
|
|
@ -128,7 +128,6 @@ struct xwl_screen {
|
|||
void *egl_display, *egl_context;
|
||||
|
||||
struct xwl_egl_backend gbm_backend;
|
||||
struct xwl_egl_backend eglstream_backend;
|
||||
/* pointer to the current backend for creating pixmaps on wayland */
|
||||
struct xwl_egl_backend *egl_backend;
|
||||
|
||||
|
|
|
@ -104,9 +104,6 @@ ddxUseMsg(void)
|
|||
ErrorF("-initfd fd add given fd as a listen socket for initialization clients\n");
|
||||
ErrorF("-listenfd fd add given fd as a listen socket\n");
|
||||
ErrorF("-listen fd deprecated, use \"-listenfd\" instead\n");
|
||||
#ifdef XWL_HAS_EGLSTREAM
|
||||
ErrorF("-eglstream use eglstream backend for nvidia GPUs\n");
|
||||
#endif
|
||||
ErrorF("-shm use shared memory for passing buffers\n");
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
ErrorF("-glamor [gl|es|off] use given API for Glamor acceleration. Incompatible with -shm option\n");
|
||||
|
@ -238,9 +235,6 @@ ddxProcessArgument(int argc, char *argv[], int i)
|
|||
LogSetParameter(XLOG_VERBOSITY, ++verbosity);
|
||||
return 1;
|
||||
}
|
||||
else if (strcmp(argv[i], "-eglstream") == 0) {
|
||||
return 1;
|
||||
}
|
||||
else if (strcmp(argv[i], "-version") == 0) {
|
||||
xwl_show_version();
|
||||
exit(0);
|
||||
|
|
|
@ -416,11 +416,10 @@ configure_file(output : 'xwin-config.h',
|
|||
input : 'xwin-config.h.meson.in',
|
||||
configuration : xwin_data)
|
||||
|
||||
build_xwayland_glamor = build_glamor and (gbm_dep.found() or build_eglstream)
|
||||
build_xwayland_glamor = build_glamor and gbm_dep.found()
|
||||
|
||||
xwayland_data = configuration_data()
|
||||
xwayland_data.set('XWL_HAS_GLAMOR', build_xwayland_glamor ? '1' : false)
|
||||
xwayland_data.set('XWL_HAS_EGLSTREAM', build_eglstream ? '1' : false)
|
||||
xwayland_data.set('XWL_HAS_LIBDECOR', have_libdecor ? '1' : false)
|
||||
xwayland_data.set('XWL_HAS_XWAYLAND_EXTENSION', xwaylandproto_dep.found() ? '1' : false)
|
||||
xwayland_data.set('XWL_HAS_EI', build_ei)
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
/* Build glamor support for Xwayland */
|
||||
#mesondefine XWL_HAS_GLAMOR
|
||||
|
||||
/* Build eglstream support for Xwayland */
|
||||
#mesondefine XWL_HAS_EGLSTREAM
|
||||
|
||||
/* Build Xwayland with libdecor support*/
|
||||
#mesondefine XWL_HAS_LIBDECOR
|
||||
|
||||
|
|
15
meson.build
15
meson.build
|
@ -363,21 +363,6 @@ else
|
|||
have_libdecor = false
|
||||
endif
|
||||
|
||||
eglstream_option = get_option('xwayland_eglstream')
|
||||
if build_xwayland and build_glamor
|
||||
eglstream_dep = dependency('wayland-eglstream-protocols', required:false)
|
||||
if eglstream_option == 'auto'
|
||||
build_eglstream = eglstream_dep.found()
|
||||
else
|
||||
build_eglstream = eglstream_option == 'true'
|
||||
if build_eglstream and not eglstream_dep.found()
|
||||
error('glamor EGLStream support requested, but wayland-eglstream-protocols not found')
|
||||
endif
|
||||
endif
|
||||
else
|
||||
build_eglstream = false
|
||||
endif
|
||||
|
||||
if build_xwayland
|
||||
libei_dep = dependency('libei-1.0', version: '>= 1.0.0', required: get_option('xwayland_ei') in ['portal', 'socket'])
|
||||
liboeffis_dep = dependency('liboeffis-1.0', version: '>= 1.0.0', required: get_option('xwayland_ei') == 'portal')
|
||||
|
|
|
@ -6,8 +6,6 @@ option('xwayland', type: 'combo', choices: ['true', 'false', 'auto'], value: 'au
|
|||
description: 'Enable Xwayland X server')
|
||||
option('glamor', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
|
||||
description: 'Enable glamor (default yes for Xorg/Xwayland builds)')
|
||||
option('xwayland_eglstream', type: 'combo', choices: ['true', 'false', 'auto'],
|
||||
value: 'auto', description: 'Enable EGLStream support for glamor on Xwayland')
|
||||
option('xwayland_ei', type: 'combo', choices: ['socket', 'portal', 'false', 'auto'],
|
||||
value: 'auto', description: 'Enable emulated input support on Xwayland')
|
||||
option('xnest', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
|
||||
|
|
Loading…
Reference in New Issue