aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.h
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-01-06 10:49:56 -0800
committerIan Romanick <[email protected]>2011-01-06 10:49:56 -0800
commit86b4398cd158024f6be9fa830554a11c2a7ebe0c (patch)
treef6a68f1bbcf218cbfefe30742054fd0002c99711 /src/glsl/glsl_parser_extras.h
parente942f328365309a1d8240cfe8eb5d88391015f37 (diff)
glsl: Support the 'invariant(all)' pragma
Previously the 'STDGL invariant(all)' pragma added in GLSL 1.20 was simply ignored by the compiler. This adds support for setting all variable invariant. In GLSL 1.10 and GLSL ES 1.00 the pragma is ignored, per the specs, but a warning is generated. Fixes piglit test glsl-invariant-pragma and bugzilla #31925. NOTE: This is a candidate for the 7.9 and 7.10 branches.
Diffstat (limited to 'src/glsl/glsl_parser_extras.h')
-rw-r--r--src/glsl/glsl_parser_extras.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index 98c4e70173d..13d3a2979e4 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -108,6 +108,13 @@ struct _mesa_glsl_parse_state {
/** Was there an error during compilation? */
bool error;
+ /**
+ * Are all shader inputs / outputs invariant?
+ *
+ * This is set when the 'STDGL invariant(all)' pragma is used.
+ */
+ bool all_invariant;
+
/** Loop or switch statement containing the current instructions. */
class ir_instruction *loop_or_switch_nesting;
class ast_iteration_statement *loop_or_switch_nesting_ast;