From: Dave Airlie Date: Sun, 8 Feb 2015 00:24:48 +0000 (-0500) Subject: glsl: Add double builtin type X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bf257d2c909681139f6880555d896745289152e7;p=mesa.git glsl: Add double builtin type This causes a lot of warnings about unchecked type in switch statements - fix them later. Signed-off-by: Dave Airlie Reviewed-by: Matt Turner Reviewed-by: Ian Romanick Reviewed-by: Ilia Mirkin --- diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index 441015c79fa..f472db0fabc 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -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 */