X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglx%2Fdri2_glx.c;h=145f44d6e8cffee23f3fffa5cbee31852cb480b4;hb=f93dc5beeed8076254998b713dde2b2211bda3b8;hp=d6eb281cf9e9ef4fda892a9873bb414d2da5f566;hpb=af7abc512c422183a761ce3d687086abe282fa74;p=mesa.git diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index d6eb281cf9e..145f44d6e8c 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -74,7 +74,7 @@ struct dri2_display __glxHashTable *dri2Hash; - const __DRIextension *loader_extensions[4]; + const __DRIextension *loader_extensions[5]; }; struct dri2_drawable @@ -946,6 +946,13 @@ dri2GetSwapInterval(__GLXDRIdrawable *pdraw) return priv->swap_interval; } +static void +driSetBackgroundContext(void *loaderPrivate) +{ + struct dri2_context *pcp = (struct dri2_context *) loaderPrivate; + __glXSetCurrentContext(&pcp->base); +} + static const __DRIdri2LoaderExtension dri2LoaderExtension = { .base = { __DRI_DRI2_LOADER, 3 }, @@ -966,6 +973,12 @@ static const __DRIuseInvalidateExtension dri2UseInvalidate = { .base = { __DRI_USE_INVALIDATE, 1 } }; +static const __DRIbackgroundCallableExtension driBackgroundCallable = { + .base = { __DRI_BACKGROUND_CALLABLE, 1 }, + + .setBackgroundContext = driSetBackgroundContext, +}; + _X_HIDDEN void dri2InvalidateBuffers(Display *dpy, XID drawable) { @@ -1393,10 +1406,10 @@ dri2CreateDisplay(Display * dpy) else pdp->loader_extensions[i++] = &dri2LoaderExtension.base; - pdp->loader_extensions[i++] = &systemTimeExtension.base; - pdp->loader_extensions[i++] = &dri2UseInvalidate.base; + pdp->loader_extensions[i++] = &driBackgroundCallable.base; + pdp->loader_extensions[i++] = NULL; pdp->dri2Hash = __glxHashCreate();