>From 1ef02e603f0296e5d11df4e9a1b783fae2da3af8 Mon Sep 17 00:00:00 2001 From: Haitao Feng <haitao.f...@intel.com> Date: Wed, 9 Feb 2011 14:52:59 -0500 Subject: [PATCH 3/3] egl_dri2: make swrast always double buffered
Signed-off-by: Haitao Feng <haitao.f...@intel.com> --- src/egl/drivers/dri2/egl_dri2.c | 7 ++++--- src/egl/drivers/dri2/platform_x11.c | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 919b996..ffd97a5 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -157,14 +157,15 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id, } } - /* In EGL, double buffer or not isn't a config attribute. Pixmaps + /* In EGL, for dri2, double buffer or not isn't a config attribute. Pixmaps * surfaces are always single buffered, pbuffer surfaces are always * back buffers and windows can be either, selected by passing an * attribute at window surface construction time. To support this * we ignore all double buffer configs and manipulate the buffer we - * return in the getBuffer callback to get the behaviour we want. */ + * return in the getBuffer callback to get the behaviour we want. + * for swrast, all surfaces are always double buffered */ - if (double_buffer) + if ((dri2_dpy->dri2 && double_buffer) || (dri2_dpy->swrast && !double_buffer)) return NULL; if (depth > 0 && depth != base.BufferSize) diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index d138763..8147e12 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -23,6 +23,7 @@ * * Authors: * Kristian Høgsberg <k...@bitplanet.net> + * Haitao Feng <haitao.f...@intel.com> */ #include <stdlib.h> -- 1.7.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev