summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 4aa1df056cf..0099a0d6d7f 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -697,6 +697,12 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
dri_config = dri2_config->dri_double_config;
else
dri_config = dri2_config->dri_single_config;
+
+ /* EGL_WINDOW_BIT is set only when there is a dri_double_config. This
+ * makes sure the back buffer will always be used.
+ */
+ if (conf->SurfaceType & EGL_WINDOW_BIT)
+ dri2_ctx->base.WindowRenderBuffer = EGL_BACK_BUFFER;
}
else
dri_config = NULL;