glsl: Add double builtin type
authorDave Airlie <airlied@redhat.com>
Sun, 8 Feb 2015 00:24:48 +0000 (19:24 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 19 Feb 2015 05:28:33 +0000 (00:28 -0500)
This causes a lot of warnings about unchecked type in
switch statements - fix them later.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/glsl/glsl_types.h

index 441015c79fa59ca4f162ada52b55990b76856cdf..f472db0fabcc3e549e8d2f5ad97372cbb39bd2dc 100644 (file)
@@ -51,6 +51,7 @@ enum glsl_base_type {
    GLSL_TYPE_UINT = 0,
    GLSL_TYPE_INT,
    GLSL_TYPE_FLOAT,
+   GLSL_TYPE_DOUBLE,
    GLSL_TYPE_BOOL,
    GLSL_TYPE_SAMPLER,
    GLSL_TYPE_IMAGE,
@@ -420,6 +421,14 @@ struct glsl_type {
       return base_type == GLSL_TYPE_FLOAT;
    }
 
+   /**
+    * Query whether or not a type is a double type
+    */
+   bool is_double() const
+   {
+      return base_type == GLSL_TYPE_DOUBLE;
+   }
+
    /**
     * Query whether or not a type is a non-array boolean type
     */