st/dri: Call dri_init_extensions only for API_OPENGL.
authorChia-I Wu <olv@lunarg.com>
Wed, 8 Sep 2010 10:20:37 +0000 (18:20 +0800)
committerChia-I Wu <olv@lunarg.com>
Wed, 8 Sep 2010 10:21:19 +0000 (18:21 +0800)
libmesagallium.a that this state tracker will be linked to expects
OpenGL's _glapi_table.  That is, it expects libGL.so instead of
libGLESv1_CM.so or libGLESv2.so.  As there is no clean way to know the
shared library the app links to, use the api as a simple check.  It
might be as well to simply remove this function call though.

src/gallium/state_trackers/dri/common/dri_context.c

index 0703a2b..f9ebe1e 100644 (file)
@@ -99,7 +99,15 @@ dri_create_context(gl_api api, const __GLcontextModes * visual,
    ctx->st->st_manager_private = (void *) ctx;
    ctx->stapi = stapi;
 
-   dri_init_extensions(ctx);
+   /*
+    * libmesagallium.a that this state tracker will be linked to expects
+    * OpenGL's _glapi_table.  That is, it expects libGL.so instead of
+    * libGLESv1_CM.so or libGLESv2.so.  As there is no clean way to know the
+    * shared library the app links to, use the api as a simple check.
+    * It might be as well to simply remove this function call though.
+    */
+   if (api == API_OPENGL)
+      dri_init_extensions(ctx);
 
    return GL_TRUE;