Mesa (master): mesa: initialize extension string when context is first bound
Brian Paul
brianp at kemper.freedesktop.org
Fri Jun 25 14:47:58 UTC 2010
Module: Mesa
Branch: master
Commit: a879d14ecf818d767f5da9dd7fd3b0cd8816cf29
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a879d14ecf818d767f5da9dd7fd3b0cd8816cf29
Author: Brian Paul <brianp at vmware.com>
Date: Thu Jun 24 14:10:24 2010 -0600
mesa: initialize extension string when context is first bound
...instead of waiting until glGetString(GL_EXTENSIONS) is called.
This fixes a problem where the MESA_EXTENSION_OVERRIDE env var is
ignored if the app never calls glGetString(GL_EXTENSIONS).
NOTE: this is a candidate patch for the 7.8 branch.
---
src/mesa/main/context.c | 2 ++
src/mesa/main/getstring.c | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 0afd77d..f597b23 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1462,6 +1462,8 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
if (newCtx->FirstTimeCurrent) {
_mesa_compute_version(newCtx);
+ newCtx->Extensions.String = _mesa_make_extension_string(newCtx);
+
check_context_limits(newCtx);
/* We can use this to help debug user's problems. Tell them to set
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index 54db579..7961ad7 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -95,8 +95,6 @@ _mesa_GetString( GLenum name )
case GL_VERSION:
return (const GLubyte *) ctx->VersionString;
case GL_EXTENSIONS:
- if (!ctx->Extensions.String)
- ctx->Extensions.String = _mesa_make_extension_string(ctx);
return (const GLubyte *) ctx->Extensions.String;
#if FEATURE_ARB_shading_language_100 || FEATURE_ES2
case GL_SHADING_LANGUAGE_VERSION:
More information about the mesa-commit
mailing list