Mesa (master): st/egl: Enable extensions before adding configs.

Chia-I Wu olv at kemper.freedesktop.org
Sun Feb 21 02:22:29 UTC 2010


Module: Mesa
Branch: master
Commit: 5d4d54574ffb73ecafd44bc533556608f3ab9ffa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d4d54574ffb73ecafd44bc533556608f3ab9ffa

Author: Chia-I Wu <olv at lunarg.com>
Date:   Sun Feb 21 10:02:13 2010 +0800

st/egl: Enable extensions before adding configs.

Configs are validated before added.  The validation depends on the
extensions available.  If configs are added before enabling extensions,
configs with EGL_SCREEN_SURFACE_MESA bit set will never pass the
validation for example.

---

 src/gallium/state_trackers/egl/common/egl_g3d.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 7ab2cd4..d769d25 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -587,19 +587,19 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
    egl_g3d_init_st(&gdrv->base);
    dpy->ClientAPIsMask = gdrv->api_mask;
 
-   if (egl_g3d_add_configs(drv, dpy, 1) == 1) {
-      _eglError(EGL_NOT_INITIALIZED, "eglInitialize(unable to add configs)");
-      goto fail;
-   }
-
 #ifdef EGL_MESA_screen_surface
-   /* enable MESA_screen_surface */
+   /* enable MESA_screen_surface before adding (and validating) configs */
    if (gdpy->native->modeset) {
       dpy->Extensions.MESA_screen_surface = EGL_TRUE;
       egl_g3d_add_screens(drv, dpy);
    }
 #endif
 
+   if (egl_g3d_add_configs(drv, dpy, 1) == 1) {
+      _eglError(EGL_NOT_INITIALIZED, "eglInitialize(unable to add configs)");
+      goto fail;
+   }
+
    *major = 1;
    *minor = 4;
 




More information about the mesa-commit mailing list