[Mesa-dev] [PATCH 13/18] nir/types: Add wrappers for a couple of atomic counter methods

Alejandro PiƱeiro apinheiro at igalia.com
Fri Jun 29 14:28:59 UTC 2018


From: Neil Roberts <nroberts at igalia.com>

---
 src/compiler/nir_types.cpp | 12 ++++++++++++
 src/compiler/nir_types.h   |  3 +++
 2 files changed, 15 insertions(+)

diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index a3c39d11383..526ecc1aa5a 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -489,3 +489,15 @@ glsl_array_depth(const struct glsl_type *type)
 {
    return type->array_depth();
 }
+
+unsigned
+glsl_atomic_size(const struct glsl_type *type)
+{
+   return type->atomic_size();
+}
+
+bool
+glsl_contains_atomic(const struct glsl_type *type)
+{
+   return type->contains_atomic();
+}
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index 4519ab617c4..5540a415dbf 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -88,6 +88,8 @@ unsigned glsl_get_record_location_offset(const struct glsl_type *type,
 
 unsigned glsl_array_depth(const struct glsl_type *type);
 
+unsigned glsl_atomic_size(const struct glsl_type *type);
+
 static inline unsigned
 glsl_get_bit_size(const struct glsl_type *type)
 {
@@ -139,6 +141,7 @@ bool glsl_type_is_numeric(const struct glsl_type *type);
 bool glsl_type_is_boolean(const struct glsl_type *type);
 bool glsl_sampler_type_is_shadow(const struct glsl_type *type);
 bool glsl_sampler_type_is_array(const struct glsl_type *type);
+bool glsl_contains_atomic(const struct glsl_type *type);
 
 const struct glsl_type *glsl_void_type(void);
 const struct glsl_type *glsl_float_type(void);
-- 
2.14.1



More information about the mesa-dev mailing list