diff options
author | Marek Olšák <[email protected]> | 2014-08-03 03:40:49 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-08-11 21:53:57 +0200 |
commit | d9a6f4360a617fccfb3987f9ec276012a9a14b75 (patch) | |
tree | c8da58890a4aa77a63a21643083aec115fea2575 /src/mesa/main | |
parent | c6cbde5008e27cccb06411146bc673835991ae91 (diff) |
mesa: make _mesa_override_glsl_version context-independent
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/context.c | 2 | ||||
-rw-r--r-- | src/mesa/main/version.c | 4 | ||||
-rw-r--r-- | src/mesa/main/version.h | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 50aae8bf6fa..0f28dbf7341 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -641,7 +641,7 @@ _mesa_init_constants(struct gl_context *ctx) /* Shading language version */ if (_mesa_is_desktop_gl(ctx)) { ctx->Const.GLSLVersion = 120; - _mesa_override_glsl_version(ctx); + _mesa_override_glsl_version(&ctx->Const); } else if (ctx->API == API_OPENGLES2) { ctx->Const.GLSLVersion = 100; diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c index b7cc50fc146..7621144c469 100644 --- a/src/mesa/main/version.c +++ b/src/mesa/main/version.c @@ -168,7 +168,7 @@ _mesa_get_gl_version_override(void) * MESA_GLSL_VERSION_OVERRIDE are integers, such as "130". */ void -_mesa_override_glsl_version(struct gl_context *ctx) +_mesa_override_glsl_version(struct gl_constants *consts) { const char *env_var = "MESA_GLSL_VERSION_OVERRIDE"; const char *version; @@ -179,7 +179,7 @@ _mesa_override_glsl_version(struct gl_context *ctx) return; } - n = sscanf(version, "%u", &ctx->Const.GLSLVersion); + n = sscanf(version, "%u", &consts->GLSLVersion); if (n != 1) { fprintf(stderr, "error: invalid value for %s: %s\n", env_var, version); return; diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index c78f87a2b4e..42eada99bf8 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -29,6 +29,7 @@ struct gl_context; +struct gl_constants; extern void @@ -38,7 +39,7 @@ extern void _mesa_override_gl_version(struct gl_context *ctx); extern void -_mesa_override_glsl_version(struct gl_context *ctx); +_mesa_override_glsl_version(struct gl_constants *consts); extern int _mesa_get_gl_version_override(void); |