mesa: Add a flag for forcing all GLSL extensions to "warn".

NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit b9e27cc142)
This commit is contained in:
Eric Anholt 2012-01-18 12:14:09 -08:00 committed by Ian Romanick
parent 1b5e151ffa
commit 92d842c073
2 changed files with 9 additions and 0 deletions

View file

@ -114,6 +114,9 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx,
}
this->supported_version_string = supported;
if (ctx->Const.ForceGLSLExtensionsWarn)
_mesa_glsl_process_extension("all", NULL, "warn", NULL, this);
}
const char *

View file

@ -2772,6 +2772,12 @@ struct gl_constants
GLuint GLSLVersion; /**< GLSL version supported (ex: 120 = 1.20) */
/**
* Changes default GLSL extension behavior from "error" to "warn". It's out
* of spec, but it can make some apps work that otherwise wouldn't.
*/
GLboolean ForceGLSLExtensionsWarn;
/**
* Does the driver support real 32-bit integers? (Otherwise, integers are
* simulated via floats.)