glsl: add glsl_type::is_integer_64()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 21 Apr 2017 08:41:13 +0000 (10:41 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 21 Apr 2017 17:33:40 +0000 (19:33 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/compiler/glsl_types.h

index 62af1496daabe5ee10ed0bdc8cdfc9cbf4a74e55..b98ce66c48df7bbe5fa00a676a01f1101b1a1a51 100644 (file)
@@ -478,6 +478,14 @@ struct glsl_type {
       return (base_type == GLSL_TYPE_UINT) || (base_type == GLSL_TYPE_INT);
    }
 
+   /**
+    * 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
     */