summaryrefslogtreecommitdiff
path: root/src/glx/drisw_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/drisw_glx.c')
-rw-r--r--src/glx/drisw_glx.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 96b6f227408..9d3bfeb31b9 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -439,12 +439,18 @@ drisw_bind_context(struct glx_context *context, struct glx_context *old,
driReleaseDrawables(&pcp->base);
- if ((*psc->core->bindContext) (pcp->driContext,
+ if (!(*psc->core->bindContext) (pcp->driContext,
pdraw ? pdraw->driDrawable : NULL,
pread ? pread->driDrawable : NULL))
- return Success;
+ return GLXBadContext;
+ if (psc->f) {
+ if (pdraw)
+ psc->f->invalidate(pdraw->driDrawable);
+ if (pread && (!pdraw || pread->driDrawable != pdraw->driDrawable))
+ psc->f->invalidate(pread->driDrawable);
+ }
- return GLXBadContext;
+ return Success;
}
static void
@@ -837,6 +843,8 @@ driswBindExtensions(struct drisw_screen *psc, const __DRIextension **extensions)
__glXEnableDirectExtension(&psc->base,
"GLX_ARB_context_flush_control");
}
+ if (strcmp(extensions[i]->name, __DRI2_FLUSH) == 0)
+ psc->f = (__DRI2flushExtension *) extensions[i];
}
if (psc->kopper) {