summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-09-08 18:20:37 +0800
committerChia-I Wu <[email protected]>2010-09-08 18:21:19 +0800
commit7e03e2b2c787657f2abe4bd362e625bd9a971c48 (patch)
tree2abc020452b88f873a89dea327f9c921e6cd1e8c /src/gallium/state_trackers/dri
parent444d8408e75bb2bce019769da59802f05c3d5fab (diff)
st/dri: Call dri_init_extensions only for API_OPENGL.
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.
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r--src/gallium/state_trackers/dri/common/dri_context.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
index 0703a2b88d9..f9ebe1edcce 100644
--- a/src/gallium/state_trackers/dri/common/dri_context.c
+++ b/src/gallium/state_trackers/dri/common/dri_context.c
@@ -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;