From 993a05f0eb4992a3608e54b607a07330b9fbe196 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 21 Apr 2017 10:13:49 +0200 Subject: [PATCH] glsl: add glsl_type::is_atomic_uint() helper MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Pitoiset Reviewed-by: Samuel Iglesias Gonsálvez Reviewed-by: Edward O'Callaghan --- src/compiler/glsl_types.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h index 7709556fe0c..10a22aee0ac 100644 --- a/src/compiler/glsl_types.h +++ b/src/compiler/glsl_types.h @@ -668,6 +668,14 @@ struct glsl_type { return size; } + /** + * Query whether or not a type is an atomic_uint. + */ + bool is_atomic_uint() const + { + return base_type == GLSL_TYPE_ATOMIC_UINT; + } + /** * Return the amount of atomic counter storage required for a type. */ -- 2.30.2