Make sure that a double buffered only config is returned when
eglChooseConfig attrib_list contains surfacetype of EGL_PBUFFER_BIT or
EGL_PIXMAP_BIT
---
 src/egl/drivers/dri2/egl_dri2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index d795a2f..608ee4e 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -269,8 +269,8 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig 
*dri_config, int id,
       return NULL;
    }
 
-   if (double_buffer) {
-      surface_type &= ~EGL_PIXMAP_BIT;
+   if (!conf->dri_single_config) {
+      surface_type &= 
~(EGL_PIXMAP_BIT|EGL_PBUFFER_BIT|EGL_SWAP_BEHAVIOR_PRESERVED_BIT);
    }
 
    conf->base.SurfaceType |= surface_type;
-- 
2.1.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to