summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-11 14:01:44 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-11 15:48:26 -0700
commitbe1d2bfdeab5781b6546b704b566aa214e79da06 (patch)
tree5cda7f5d256b3911d5876f436e2fc9572f2c5266 /ir.h
parent39d6dd3537ce436806dbb5e7f6fa7c5477babb8e (diff)
Matrix and vector constructors with a single constant scalar are constant
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/ir.h b/ir.h
index 718c495..1fdd125 100644
--- a/ir.h
+++ b/ir.h
@@ -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;