Mesa (master): glsl: add glsl_type::is_atomic_uint() helper
Samuel Pitoiset
hakzsam at kemper.freedesktop.org
Fri Apr 21 17:37:06 UTC 2017
Module: Mesa
Branch: master
Commit: 993a05f0eb4992a3608e54b607a07330b9fbe196
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=993a05f0eb4992a3608e54b607a07330b9fbe196
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Fri Apr 21 10:13:49 2017 +0200
glsl: add glsl_type::is_atomic_uint() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>
---
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 7709556fe0..10a22aee0a 100644
--- a/src/compiler/glsl_types.h
+++ b/src/compiler/glsl_types.h
@@ -669,6 +669,14 @@ struct glsl_type {
}
/**
+ * 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.
*/
unsigned atomic_size() const
More information about the mesa-commit
mailing list