summaryrefslogtreecommitdiff
path: root/src/glx/dri_glx.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2012-11-13 17:06:37 +0100
committerMarek Olšák <maraeo@gmail.com>2012-12-02 00:15:00 +0100
commit5b7e9b73603ce5fb48cc30896df277df0ae89856 (patch)
tree7840be63f07549f565283a81e41e7d279a9433e4 /src/glx/dri_glx.c
parent8ad9d42b338c6684930b7898734f9070b6368172 (diff)
glx: move the glFlush call one layer down
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 f42db79ad61..ba8fda20ad2 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);
}