From a1eff5570f5e3f893fe4d453aef5ce143712ab09 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 27 Sep 2011 13:53:11 -0700 Subject: mesa: Allow overriding GLSL version with environment variable Override the context's GLSL version if the environment variable MESA_GLSL_VERSION_OVERRIDE is set. Valid values for MESA_GLSL_VERSION_OVERRIDE are integers, such as "130". MESA_GLSL_VERSION_OVERRIDE has the same behavior as INTEL_GLSL_VERSION, except that it applies to all drivers, not just Intel's. Since the former supercedes the latter, this patch disables the latter. Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke Signed-off-by: Chad Versace --- src/mesa/main/context.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/main/context.c') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index b20063c33b2..2532c47de15 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -627,6 +627,7 @@ _mesa_init_constants(struct gl_context *ctx) /* Shading language version */ if (ctx->API == API_OPENGL) { ctx->Const.GLSLVersion = 120; + _mesa_override_glsl_version(ctx); } else if (ctx->API == API_OPENGLES2) { ctx->Const.GLSLVersion = 100; -- cgit v1.2.3