aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-02-07 19:24:48 -0500
committerIlia Mirkin <[email protected]>2015-02-19 00:28:33 -0500
commitbf257d2c909681139f6880555d896745289152e7 (patch)
tree2a29ce84a5beb73e6eaacae444ddfb420bbeb970 /src
parent6227af26908251601b6a8ba6297ef6ce4fb34786 (diff)
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 <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/glsl_types.h9
1 files changed, 9 insertions, 0 deletions
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,
@@ -421,6 +422,14 @@ struct glsl_type {
}
/**
+ * 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
*/
bool is_boolean() const