summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-04-21 10:13:49 +0200
committerSamuel Pitoiset <[email protected]>2017-04-21 19:33:27 +0200
commit993a05f0eb4992a3608e54b607a07330b9fbe196 (patch)
tree1ed3fd1ced230ad2e25a2b3b33a3d73ce4c17db5
parent52df318d61f4892dbbaa8f0da4787f25caf1b0d1 (diff)
glsl: add glsl_type::is_atomic_uint() helper
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
-rw-r--r--src/compiler/glsl_types.h8
1 files changed, 8 insertions, 0 deletions
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
@@ -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