From ff37280fd93fc74bada33c7a5683897d47565a75 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Wed, 19 Nov 2025 16:23:53 +0100 Subject: [PATCH] Revert "glamor_egl: add support of GlxVendorLibrary option" This reverts commit 062d39977094c89ef34168b78b9c9e9fc85483ff. There is an issue with this code in GLAMOR EGL and using this option in the "xorg.conf" would lead to a segmentation fault in the Xserver. Instead of fixing the code for that option in GLAMOR EGL, let's revert the commit in the stable branch, since we are to revert support for glamor GLX, this options will no longer be needed. See-also: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1848 See-also: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2096 Part-of: --- glamor/glamor_egl.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index d1896340f..a3ea4c3d5 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@ -59,7 +59,6 @@ struct glamor_egl_screen_private { int fd; struct gbm_device *gbm; int dmabuf_capable; - Bool force_vendor; /* if GLVND vendor is forced from options */ CloseScreenProcPtr saved_close_screen; DestroyPixmapProcPtr saved_destroy_pixmap; @@ -914,13 +913,10 @@ glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx) glamor_ctx->make_current = glamor_egl_make_current; - /* Use dynamic logic only if vendor is not forced via xorg.conf */ - if (!glamor_egl->force_vendor) { - gbm_backend_name = gbm_device_get_backend_name(glamor_egl->gbm); - /* Mesa uses "drm" as backend name, in that case, just do nothing */ - if (gbm_backend_name && strcmp(gbm_backend_name, "drm") != 0) - glamor_set_glvnd_vendor(screen, gbm_backend_name); - } + gbm_backend_name = gbm_device_get_backend_name(glamor_egl->gbm); + /* Mesa uses "drm" as backend name, in that case, just do nothing */ + if (gbm_backend_name && strcmp(gbm_backend_name, "drm") != 0) + glamor_set_glvnd_vendor(screen, gbm_backend_name); #ifdef DRI3 /* Tell the core that we have the interfaces for import/export * of pixmaps. @@ -1074,12 +1070,10 @@ glamor_egl_try_gles_api(ScrnInfoPtr scrn) enum { GLAMOREGLOPT_RENDERING_API, - GLAMOREGLOPT_VENDOR_LIBRARY }; static const OptionInfoRec GlamorEGLOptions[] = { { GLAMOREGLOPT_RENDERING_API, "RenderingAPI", OPTV_STRING, {0}, FALSE }, - { GLAMOREGLOPT_VENDOR_LIBRARY, "GlxVendorLibrary", OPTV_STRING, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE }, }; @@ -1092,7 +1086,6 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd) const char *api = NULL; Bool es_allowed = TRUE; Bool force_es = FALSE; - const char *glvnd_vendor = NULL; glamor_egl = calloc(sizeof(*glamor_egl), 1); if (glamor_egl == NULL) @@ -1103,11 +1096,6 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd) options = xnfalloc(sizeof(GlamorEGLOptions)); memcpy(options, GlamorEGLOptions, sizeof(GlamorEGLOptions)); xf86ProcessOptions(scrn->scrnIndex, scrn->options, options); - glvnd_vendor = xf86GetOptValString(options, GLAMOREGLOPT_VENDOR_LIBRARY); - if (glvnd_vendor) { - glamor_set_glvnd_vendor(xf86ScrnToScreen(scrn), glvnd_vendor); - glamor_egl->force_vendor = TRUE; - } api = xf86GetOptValString(options, GLAMOREGLOPT_RENDERING_API); if (api && !strncasecmp(api, "es", 2)) force_es = TRUE;