From: Alejandro PiƱeiro Date: Fri, 10 Nov 2017 15:32:41 +0000 (+0100) Subject: nir_types: add glsl_atomic_uint_type() helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=88d3325a445d85d30a45d1f4c4b83c232f2660c4;p=mesa.git nir_types: add glsl_atomic_uint_type() helper Reviewed-by: Timothy Arceri --- 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