summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-12-14 12:00:14 -0800
committerIan Romanick <[email protected]>2013-01-25 09:07:34 -0500
commit13be1f4a103802ed936f2374d72b2f6979dafd58 (patch)
tree636053ac19725220449afbcb65310ec99e1c1ddf /src/glsl/ir.h
parent17e6f1904444be019cafa208495e3fe479cb86fd (diff)
glsl: Add ir_variable::is_in_uniform_block predicate
The way a variable is tested for this property is about to change, and this makes the code easier to modify. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 9fdfb18e25b..14212dfb7a2 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -350,6 +350,14 @@ public:
glsl_interp_qualifier determine_interpolation_mode(bool flat_shade);
/**
+ * Determine whether or not a variable is part of a uniform block.
+ */
+ inline bool is_in_uniform_block() const
+ {
+ return this->mode == ir_var_uniform && this->uniform_block != -1;
+ }
+
+ /**
* Declared type of the variable
*/
const struct glsl_type *type;