Mesa (master): egl_dri2: Only clear EGL_PIXMAP_BIT if DRI config is double buffered
Kristian Høgsberg
krh at kemper.freedesktop.org
Wed Aug 31 22:37:29 UTC 2011
Module: Mesa
Branch: master
Commit: 447bb454d848d98134ff916ab8a3b316fb136c59
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=447bb454d848d98134ff916ab8a3b316fb136c59
Author: Kristian Høgsberg <krh at bitplanet.net>
Date: Wed Aug 31 18:20:06 2011 -0400
egl_dri2: Only clear EGL_PIXMAP_BIT if DRI config is double buffered
We don't want to set the pixmap bit in the EGL config if the DRI
config we're adding is a double buffered config. However, don't clear
any other bits the platform might pass in in the surface_type
argument.
---
src/egl/drivers/dri2/egl_dri2.c | 6 ++++--
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 0099a0d..6c1c17d 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;
}
More information about the mesa-commit
mailing list