aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxdriswrast.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/glxdriswrast.c')
-rw-r--r--xorg-server/glx/glxdriswrast.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xorg-server/glx/glxdriswrast.c b/xorg-server/glx/glxdriswrast.c
index 74ba09da6..d4dcd9080 100644
--- a/xorg-server/glx/glxdriswrast.c
+++ b/xorg-server/glx/glxdriswrast.c
@@ -349,6 +349,7 @@ swrastPutImage(__DRIdrawable * draw, int op,
__GLXDRIdrawable *drawable = loaderPrivate;
DrawablePtr pDraw = drawable->base.pDraw;
GCPtr gc;
+ __GLXcontext *cx = lastGLContext;
switch (op) {
case __DRI_SWRAST_IMAGE_OP_DRAW:
@@ -364,6 +365,10 @@ swrastPutImage(__DRIdrawable * draw, int op,
ValidateGC(pDraw, gc);
gc->ops->PutImage(pDraw, gc, pDraw->depth, x, y, w, h, 0, ZPixmap, data);
+ if (cx != lastGLContext) {
+ lastGLContext = cx;
+ cx->makeCurrent(cx);
+ }
}
static void
@@ -373,8 +378,13 @@ swrastGetImage(__DRIdrawable * draw,
__GLXDRIdrawable *drawable = loaderPrivate;
DrawablePtr pDraw = drawable->base.pDraw;
ScreenPtr pScreen = pDraw->pScreen;
+ __GLXcontext *cx = lastGLContext;
pScreen->GetImage(pDraw, x, y, w, h, ZPixmap, ~0L, data);
+ if (cx != lastGLContext) {
+ lastGLContext = cx;
+ cx->makeCurrent(cx);
+ }
}
static const __DRIswrastLoaderExtension swrastLoaderExtension = {