[Mesa-dev] [PATCH 1/3] glsl: Disallow `pragma STDGL invariant(all)` in fragment shaders
Chris Forbes
chrisf at ijw.co.nz
Sat Nov 29 12:54:58 PST 2014
Fixes the piglit test: spec/glsl-es-3.00/compiler/invariant_all.frag
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
src/glsl/glsl_parser.yy | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index dbab815..6592a84 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -337,6 +337,10 @@ pragma_statement:
"pragma `invariant(all)' not supported in %s "
"(GLSL ES 1.00 or GLSL 1.20 required)",
state->get_version_string());
+ } else if (state->stage == MESA_SHADER_FRAGMENT) {
+ _mesa_glsl_error(& @1, state,
+ "pragma `invariant(all)' may not be used in a "
+ "fragment shader.");
} else {
state->all_invariant = true;
}
--
2.1.3
More information about the mesa-dev
mailing list