From cb7d066967b85c52fe15590b56529254516261e7 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 23 Mar 2010 15:03:46 -0700 Subject: [PATCH] Add query to determine whether a type is a sampler --- glsl_types.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/glsl_types.h b/glsl_types.h index 57f339a9a6f..b1cd9a9d637 100644 --- a/glsl_types.h +++ b/glsl_types.h @@ -167,6 +167,14 @@ struct glsl_type { return (matrix_rows > 0) && (base_type == GLSL_TYPE_FLOAT); } + /** + * Query whether or not a type is a sampler + */ + bool is_sampler() const + { + return base_type == GLSL_TYPE_SAMPLER; + } + /** * Query whether or not a type is the void type singleton. */ -- 2.30.2