summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/version.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index d833a160e9e..9e1f5f2a4fe 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -260,11 +260,15 @@ compute_version_es2(GLcontext *ctx)
/**
* Set the context's VersionMajor, VersionMinor, VersionString fields.
- * This should only be called once as part of context initialization.
+ * This should only be called once as part of context initialization
+ * or to perform version check for GLX_ARB_create_context_profile.
*/
void
_mesa_compute_version(GLcontext *ctx)
{
+ if (ctx->VersionMajor)
+ return;
+
switch (ctx->API) {
case API_OPENGL:
compute_version(ctx);