diff options
author | Paul Berry <[email protected]> | 2013-09-24 14:30:29 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-10-09 16:49:26 -0700 |
commit | 22d3ef2df1f4fd6c4a0aaf17996fdcd9b70547cb (patch) | |
tree | 609e6c8706f024d684eb32b8de1e828a57dcefb6 /src/glsl/ir.h | |
parent | 6f19e552af7ab078cfefbcaa1560bb921ddcaf07 (diff) |
glsl: Make accessor functions for ir_variable::interface_type.
In a future patch, this will allow us to enforce invariants when the
interface type is updated.
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r-- | src/glsl/ir.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 9fd5f5a997a..a2778570826 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -392,6 +392,20 @@ public: } /** + * Set this->interface_type on a newly created variable. + */ + void init_interface_type(const struct glsl_type *type) + { + assert(this->interface_type == NULL); + this->interface_type = type; + } + + const glsl_type *get_interface_type() const + { + return this->interface_type; + } + + /** * Declared type of the variable */ const struct glsl_type *type; @@ -582,6 +596,7 @@ public: */ ir_constant *constant_initializer; +private: /** * 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. |