st/egl: Do not ignore configs without a renderable type.
authorChia-I Wu <olvaffe@gmail.com>
Sat, 30 Jan 2010 17:25:59 +0000 (01:25 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Sun, 31 Jan 2010 03:20:15 +0000 (11:20 +0800)
Configs without a renderable type are still informative for programs
such as eglinfo.

src/gallium/state_trackers/egl/common/egl_g3d.c

index e8f46e5..6c8f3b9 100644 (file)
@@ -464,18 +464,18 @@ egl_g3d_add_configs(_EGLDriver *drv, _EGLDisplay *dpy, EGLint id)
       struct egl_g3d_config *gconf;
       EGLBoolean valid;
 
+      gconf = CALLOC_STRUCT(egl_g3d_config);
+      if (!gconf)
+         continue;
+
+      _eglInitConfig(&gconf->base, id);
+
       api_mask = get_mode_api_mask(&native_configs[i]->mode, gdrv->api_mask);
       if (!api_mask) {
          _eglLog(_EGL_DEBUG, "no state tracker supports config 0x%x",
                native_configs[i]->mode.visualID);
-         continue;
       }
 
-      gconf = CALLOC_STRUCT(egl_g3d_config);
-      if (!gconf)
-         continue;
-
-      _eglInitConfig(&gconf->base, id);
       valid = _eglConfigFromContextModesRec(&gconf->base,
             &native_configs[i]->mode, api_mask, api_mask);
       if (valid) {