summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-04 16:13:35 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-11 13:51:09 -0700
commit989cfc432ee7adef701a87783e0c6b064c1cfaee (patch)
treecb29a9510ff561ce0858076f7966a2fe4dee3945 /ir.h
parent565185cd8f3ea636d3d2aaad9218d63323390464 (diff)
Construct an ir_constant from a scalar component of another ir_constant
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/ir.h b/ir.h
index ea4f549468..102f2f3727 100644
--- a/ir.h
+++ b/ir.h
@@ -1026,6 +1026,18 @@ public:
ir_constant(int i);
ir_constant(float f);
+ /**
+ * Construct an ir_constant from a scalar component of another ir_constant
+ *
+ * The new \c ir_constant inherits the type of the component from the
+ * source constant.
+ *
+ * \note
+ * In the case of a matrix constant, the new constant is a scalar, \b not
+ * a vector.
+ */
+ ir_constant(const ir_constant *c, unsigned i);
+
virtual ir_constant *as_constant()
{
return this;