summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index a3f9f058863..55535b2f5ce 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -201,7 +201,8 @@ public:
* for vector and scalar types that have all elements set to the value
* zero (or \c false for booleans).
*
- * \sa ir_constant::has_value, ir_rvalue::is_one, ir_rvalue::is_negative_one
+ * \sa ir_constant::has_value, ir_rvalue::is_one, ir_rvalue::is_negative_one,
+ * ir_constant::is_basis
*/
virtual bool is_zero() const;
@@ -213,7 +214,8 @@ public:
* for vector and scalar types that have all elements set to the value
* one (or \c true for booleans).
*
- * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_negative_one
+ * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_negative_one,
+ * ir_constant::is_basis
*/
virtual bool is_one() const;
@@ -223,12 +225,27 @@ public:
* The base implementation of this function always returns \c false. The
* \c ir_constant class over-rides this function to return \c true \b only
* for vector and scalar types that have all elements set to the value
- * negative one. For boolean times, the result is always \c false.
+ * negative one. For boolean types, the result is always \c false.
*
* \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_one
+ * ir_constant::is_basis
*/
virtual bool is_negative_one() const;
+ /**
+ * Determine if an r-value is a basis vector
+ *
+ * The base implementation of this function always returns \c false. The
+ * \c ir_constant class over-rides this function to return \c true \b only
+ * for vector and scalar types that have one element set to the value one,
+ * and the other elements set to the value zero. For boolean types, the
+ * result is always \c false.
+ *
+ * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_one,
+ * is_constant::is_negative_one
+ */
+ virtual bool is_basis() const;
+
/**
* Return a generic value of error_type.
@@ -1743,13 +1760,14 @@ public:
* Determine whether a constant has the same value as another constant
*
* \sa ir_constant::is_zero, ir_constant::is_one,
- * ir_constant::is_negative_one
+ * ir_constant::is_negative_one, ir_constant::is_basis
*/
bool has_value(const ir_constant *) const;
virtual bool is_zero() const;
virtual bool is_one() const;
virtual bool is_negative_one() const;
+ virtual bool is_basis() const;
/**
* Value of the constant.