From 88d3325a445d85d30a45d1f4c4b83c232f2660c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alejandro=20Pi=C3=B1eiro?= Date: Fri, 10 Nov 2017 16:32:41 +0100 Subject: [PATCH] nir_types: add glsl_atomic_uint_type() helper Reviewed-by: Timothy Arceri --- src/compiler/nir_types.cpp | 6 ++++++ src/compiler/nir_types.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index 2b932b1967e..973881fc41c 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -533,3 +533,9 @@ glsl_get_natural_size_align_bytes(const struct glsl_type *type, unreachable("type does not have a natural size"); } } + +const glsl_type * +glsl_atomic_uint_type(void) +{ + return glsl_type::atomic_uint_type; +} diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index 67c4d7b5097..d0fd99706b3 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -190,6 +190,8 @@ typedef void (*glsl_type_size_align_func)(const struct glsl_type *type, void glsl_get_natural_size_align_bytes(const struct glsl_type *type, unsigned *size, unsigned *align); +const struct glsl_type *glsl_atomic_uint_type(void); + #ifdef __cplusplus } #endif -- 2.30.2