diff options
Diffstat (limited to 'mesalib/src/glsl/ir.h')
-rw-r--r-- | mesalib/src/glsl/ir.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h index ee276d2be..6c7c60a27 100644 --- a/mesalib/src/glsl/ir.h +++ b/mesalib/src/glsl/ir.h @@ -265,6 +265,13 @@ public: */ virtual bool is_basis() const; + /** + * Determine if an r-value is an unsigned integer constant which can be + * stored in 16 bits. + * + * \sa ir_constant::is_uint16_constant. + */ + virtual bool is_uint16_constant() const { return false; } /** * Return a generic value of error_type. @@ -2165,6 +2172,14 @@ public: virtual bool is_basis() const; /** + * Return true for constants that could be stored as 16-bit unsigned values. + * + * Note that this will return true even for signed integer ir_constants, as + * long as the value is non-negative and fits in 16-bits. + */ + virtual bool is_uint16_constant() const; + + /** * Value of the constant. * * The field used to back the values supplied by the constant is determined |