summaryrefslogtreecommitdiff
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 80e0f67d6d..6a70dede9b 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1441,10 +1441,34 @@ public:
/**
* Determine whether a constant has the same value as another constant
+ *
+ * \sa ir_constant::is_zero, ir_constant::is_one
*/
bool has_value(const ir_constant *) const;
/**
+ * Determine if a constant has the value zero
+ *
+ * \note
+ * This function always returns \c false for constants that are not
+ * scalars or vectors.
+ *
+ * \sa ir_constant::has_value, ir_constant::is_one
+ */
+ bool is_zero() const;
+
+ /**
+ * Determine if a constant has the value one
+ *
+ * \note
+ * This function always returns \c false for constants that are not
+ * scalars or vectors.
+ *
+ * \sa ir_constant::has_value, ir_constant::is_zero
+ */
+ bool is_one() const;
+
+ /**
* Value of the constant.
*
* The field used to back the values supplied by the constant is determined