From 13be1f4a103802ed936f2374d72b2f6979dafd58 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 14 Dec 2012 12:00:14 -0800 Subject: 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 Reviewed-by: Carl Worth Reviewed-by: Kenneth Graunke --- src/glsl/ir.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/glsl/ir.h') 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 @@ -349,6 +349,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 */ -- cgit v1.2.3