From: Chia-I Wu Date: Sun, 21 Feb 2010 02:02:13 +0000 (+0800) Subject: st/egl: Enable extensions before adding configs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d4d54574ffb73ecafd44bc533556608f3ab9ffa;p=mesa.git 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. --- diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c index 7ab2cd49abd..d769d253ac5 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;