summaryrefslogtreecommitdiff
path: root/src/glx/dri_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/dri_glx.c')
-rw-r--r--src/glx/dri_glx.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index f42db79ad6..ba8fda20ad 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -684,22 +684,30 @@ driCreateDrawable(struct glx_screen *base,
static int64_t
driSwapBuffers(__GLXDRIdrawable * pdraw, int64_t unused1, int64_t unused2,
- int64_t unused3)
+ int64_t unused3, Bool flush)
{
struct dri_screen *psc = (struct dri_screen *) pdraw->psc;
struct dri_drawable *pdp = (struct dri_drawable *) pdraw;
+ if (flush) {
+ glFlush();
+ }
+
(*psc->core->swapBuffers) (pdp->driDrawable);
return 0;
}
static void
driCopySubBuffer(__GLXDRIdrawable * pdraw,
- int x, int y, int width, int height)
+ int x, int y, int width, int height, Bool flush)
{
struct dri_drawable *pdp = (struct dri_drawable *) pdraw;
struct dri_screen *psc = (struct dri_screen *) pdp->base.psc;
+ if (flush) {
+ glFlush();
+ }
+
(*psc->driCopySubBuffer->copySubBuffer) (pdp->driDrawable,
x, y, width, height);
}