glsl: Cross validate variable's invariance by explicit invariance only
[mesa.git] / src / compiler / glsl / ir.h
index 9ec332ab46cee8a27fdb81043bd8888adebb612a..4dc2a5f6bc75bd44fd5b3adbad0daa0b7c15cff8 100644 (file)
@@ -657,6 +657,19 @@ public:
       unsigned centroid:1;
       unsigned sample:1;
       unsigned patch:1;
+      /**
+       * Was an 'invariant' qualifier explicitly set in the shader?
+       *
+       * This is used to cross validate qualifiers.
+       */
+      unsigned explicit_invariant:1;
+      /**
+       * Is the variable invariant?
+       *
+       * It can happen either by having the 'invariant' qualifier
+       * explicitly set in the shader or by being used in calculations
+       * of other invariant variables.
+       */
       unsigned invariant:1;
       unsigned precise:1;