[Mesa-dev] [PATCH v5 03/29] glsl: Add double builtin type
Ian Romanick
idr at freedesktop.org
Wed Feb 11 11:20:51 PST 2015
This patch is
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
On 02/10/2015 03:58 AM, Ilia Mirkin wrote:
> This causes a lot of warnings about unchecked type in
> switch statements - fix them later.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> Reviewed-by: Matt Turner <mattst88 at gmail.com>
> ---
> src/glsl/glsl_types.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
> index 441015c..f472db0 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
>
More information about the mesa-dev
mailing list