aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir.h
diff options
context:
space:
mode:
authorDanylo Piliaiev <[email protected]>2018-09-04 11:42:04 +0300
committerJordan Justen <[email protected]>2019-03-21 23:28:08 -0700
commitea9bde151f1394ff82b73d028c2a3a747723e525 (patch)
treea75bb87a5fc1b550dfcab077bfc2a6f89e22cd96 /src/compiler/glsl/ir.h
parent1d996ef7144f97ce948fb8e8ec5792898bea56f6 (diff)
glsl: Cross validate variable's invariance by explicit invariance only
'invariant' qualifier is propagated on variables which are used to calculate other invariant variables, however when we are matching variable's declarations we should take into account only explicitly declared invariance because invariance propagation is an implementation specific detail. Thus new flag is added to ir_variable_data which indicates 'invariant' qualifier being explicitly set in the shader. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100316 Fixes: 89b60492 ('glsl: Add a pass to propagate the "invariant" and "precise" qualifiers') Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir.h')
-rw-r--r--src/compiler/glsl/ir.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h
index 9ec332ab46c..4dc2a5f6bc7 100644
--- a/src/compiler/glsl/ir.h
+++ b/src/compiler/glsl/ir.h
@@ -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;