From 5d4d54574ffb73ecafd44bc533556608f3ab9ffa Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sun, 21 Feb 2010 10:02:13 +0800 Subject: [PATCH] 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 file 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; -- 2.7.4