[Mesa-dev] [PATCH] Dri2 egl filter away dobule buffer configs for pbuffers and pixmaps

Jørgen Lind jorgen.lind at theqtcompany.com
Wed Dec 3 00:55:22 PST 2014


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



More information about the mesa-dev mailing list