Merge branch 'master-glx-provider-option' into 'master'

glamor_egl: Add GlxProvider option for Glamor

See merge request xorg/xserver!2100
This commit is contained in:
Konstantin 2026-02-06 15:44:00 +03:00
commit cd78d5f7ba
2 changed files with 11 additions and 2 deletions

View file

@ -60,6 +60,7 @@ struct glamor_egl_screen_private {
struct gbm_device *gbm;
int dmabuf_capable;
char *glvnd_vendor; /* GLVND vendor if forced from options or NULL otherwise */
Bool provider_enabled; /* if GLX provider is enabled in options */
CloseScreenProcPtr saved_close_screen;
DestroyPixmapProcPtr saved_destroy_pixmap;
@ -951,7 +952,7 @@ glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
}
#endif
#ifdef GLXEXT
if (!vendor_initialized) {
if (glamor_egl->provider_enabled && !vendor_initialized) {
GlxPushProvider(&glamor_provider);
xorgGlxCreateVendor();
vendor_initialized = TRUE;
@ -1081,12 +1082,14 @@ glamor_egl_try_gles_api(ScrnInfoPtr scrn)
enum {
GLAMOREGLOPT_RENDERING_API,
GLAMOREGLOPT_VENDOR_LIBRARY
GLAMOREGLOPT_VENDOR_LIBRARY,
GLAMOREGLOPT_GLX_PROVIDER
};
static const OptionInfoRec GlamorEGLOptions[] = {
{ GLAMOREGLOPT_RENDERING_API, "RenderingAPI", OPTV_STRING, {0}, FALSE },
{ GLAMOREGLOPT_VENDOR_LIBRARY, "GlxVendorLibrary", OPTV_STRING, {0}, FALSE },
{ GLAMOREGLOPT_GLX_PROVIDER, "GlamorGlxProvider", OPTV_BOOLEAN, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE },
};
@ -1119,6 +1122,7 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
force_es = TRUE;
else if (api && !strncasecmp(api, "gl", 2))
es_allowed = FALSE;
glamor_egl->provider_enabled = xf86ReturnOptValBool(GlamorEGLOptions, GLAMOREGLOPT_GLX_PROVIDER, TRUE);
free(options);
scrn->privates[xf86GlamorEGLPrivateIndex].ptr = glamor_egl;

View file

@ -2122,6 +2122,11 @@ not available. This may be useful for embedded and old cards, where GL ES
feature set works faster than GL feature set.
Default: gl.
.TP 7
.BI "Option \*GlamorGlxProvider\*q \*q" boolean \*q
This option specifies whether you want to use Glamor GLX provider in conjunction
with Glamor accelerated Xorg.
Default: true.
.TP 7
.BI "Option \*qInitPrimary\*q \*q" boolean \*q
Use the Int10 module to initialize the primary graphics card.
Normally, only secondary cards are soft-booted using the Int10 module, as the