Module: Mesa
Branch: master
Commit: 993a05f0eb4992a3608e54b607a07330b9fbe196
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=993a05f0eb4992a3608e54b607a07330b9fbe196

Author: Samuel Pitoiset <samuel.pitoi...@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.pitoi...@gmail.com>
Reviewed-by: Samuel Iglesias Gonsálvez <sigles...@igalia.com>
Reviewed-by: Edward O'Callaghan <funfunc...@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

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to