diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-11 14:01:44 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-11 15:48:26 -0700 |
commit | be1d2bfdeab5781b6546b704b566aa214e79da06 (patch) | |
tree | 5cda7f5d256b3911d5876f436e2fc9572f2c5266 /ir.h | |
parent | 39d6dd3537ce436806dbb5e7f6fa7c5477babb8e (diff) |
Matrix and vector constructors with a single constant scalar are constant
Diffstat (limited to 'ir.h')
-rw-r--r-- | ir.h | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -1018,6 +1018,17 @@ public: }; +/** + * Data stored in an ir_constant + */ +union ir_constant_data { + unsigned u[16]; + int i[16]; + float f[16]; + bool b[16]; +}; + + class ir_constant : public ir_rvalue { public: ir_constant(const struct glsl_type *type, const void *data); @@ -1080,12 +1091,7 @@ public: * by the type associated with the \c ir_instruction. Constants may be * scalars, vectors, or matrices. */ - union { - unsigned u[16]; - int i[16]; - float f[16]; - bool b[16]; - } value; + union ir_constant_data value; exec_list components; |