Mesa (master): st/egl: Skip single-buffered configs in EGL.
Chia-I Wu
olv at kemper.freedesktop.org
Thu Sep 30 09:05:23 UTC 2010
Module: Mesa
Branch: master
Commit: d63b2622f1c47d6f82fe96c9f1b749d908883a23
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d63b2622f1c47d6f82fe96c9f1b749d908883a23
Author: Chia-I Wu <olv at lunarg.com>
Date: Thu Sep 30 16:53:33 2010 +0800
st/egl: Skip single-buffered configs in EGL.
Let DRI2 report single-buffered configs and skip them in EGL. This is
based on the patch by Luca Barbieri.
---
src/gallium/state_trackers/egl/common/egl_g3d.c | 4 ++++
src/gallium/state_trackers/egl/x11/native_dri2.c | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index ce2b1f7..bfbb431 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -258,6 +258,10 @@ egl_g3d_init_config(_EGLDriver *drv, _EGLDisplay *dpy,
EGLint buffer_mask, api_mask;
EGLBoolean valid;
+ /* skip single-buffered configs */
+ if (!(nconf->buffer_mask & (1 << NATIVE_ATTACHMENT_BACK_LEFT)))
+ return EGL_FALSE;
+
buffer_mask = 0x0;
if (nconf->buffer_mask & (1 << NATIVE_ATTACHMENT_FRONT_LEFT))
buffer_mask |= ST_ATTACHMENT_FRONT_LEFT_MASK;
diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c
index 1be1e42..1169e27 100644
--- a/src/gallium/state_trackers/egl/x11/native_dri2.c
+++ b/src/gallium/state_trackers/egl/x11/native_dri2.c
@@ -518,10 +518,6 @@ dri2_display_convert_config(struct native_display *ndpy,
if (!(mode->renderType & GLX_RGBA_BIT) || !mode->rgbMode)
return FALSE;
- /* skip single-buffered configs */
- if (!mode->doubleBufferMode)
- return FALSE;
-
/* only interested in native renderable configs */
if (!mode->xRenderable || !mode->drawableType)
return FALSE;
More information about the mesa-commit
mailing list