[Mesa-dev] [PATCH 01/11] glsl: add glsl_type::is_atomic_uint() helper

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Apr 21 09:53:21 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 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
-- 
2.12.2



More information about the mesa-dev mailing list