summaryrefslogtreecommitdiff
path: root/src/egl/drivers/dri2/egl_dri2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 0099a0d6d7..6c1c17d435 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -259,8 +259,10 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
return NULL;
}
- conf->base.SurfaceType |= surface_type & (!double_buffer ? EGL_PIXMAP_BIT:
- (EGL_WINDOW_BIT | EGL_PBUFFER_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT));
+ if (double_buffer)
+ surface_type &= ~EGL_PIXMAP_BIT;
+
+ conf->base.SurfaceType |= surface_type;
return conf;
}