Mesa (master): glsl: add glsl_type::is_integer_64()

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Fri Apr 21 17:37:06 UTC 2017


Module: Mesa
Branch: master
Commit: 87be9faa7811e77471b5bf2964e484bb9de84883
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=87be9faa7811e77471b5bf2964e484bb9de84883

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Fri Apr 21 10:41:13 2017 +0200

glsl: add glsl_type::is_integer_64()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

---

 src/compiler/glsl_types.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h
index 62af1496da..b98ce66c48 100644
--- a/src/compiler/glsl_types.h
+++ b/src/compiler/glsl_types.h
@@ -479,6 +479,14 @@ struct glsl_type {
    }
 
    /**
+    * Query whether or not a type is a 64-bit integer.
+    */
+   bool is_integer_64() const
+   {
+      return base_type == GLSL_TYPE_UINT64 || base_type == GLSL_TYPE_INT64;
+   }
+
+   /**
     * Query whether or not a type is a 32-bit or 64-bit integer
     */
    bool is_integer_32_64() const




More information about the mesa-commit mailing list