summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
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;