diff options
author | Ian Romanick <[email protected]> | 2013-01-21 21:51:15 -0500 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-01-25 09:07:34 -0500 |
commit | 7a7b44b329c8090969587d1dab23721d47f82e4a (patch) | |
tree | e15923406c8513af904911c4eeee92a5ec210fd1 /src/glsl/ir.h | |
parent | 13be1f4a103802ed936f2374d72b2f6979dafd58 (diff) |
glsl: Add ir_variable::interface_type field
For variables that are in an interface block or are an instance of an
interface block, this is the GLSL_TYPE_INTERFACE type for that block.
Convert the ir_variable::is_in_uniform_block method added in the
previous commit to use this field instead of ir_variable::uniform_block.
v2: Fix the place-holder comment on ir_variable::interface_type.
Suggested by Paul Berry.
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.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 14212dfb7a2..ff47b3a5a80 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -354,7 +354,7 @@ public: */ inline bool is_in_uniform_block() const { - return this->mode == ir_var_uniform && this->uniform_block != -1; + return this->mode == ir_var_uniform && this->interface_type != NULL; } /** @@ -540,6 +540,14 @@ public: * objects. */ ir_constant *constant_initializer; + + /** + * For variables that are in an interface block or are an instance of an + * interface block, this is the \c GLSL_TYPE_INTERFACE type for that block. + * + * \sa ir_variable::location + */ + const glsl_type *interface_type; }; |