From: Nicolai Hähnle <nicolai.haeh...@amd.com> We will use this from radeonsi/nir, which we want to keep as pure C code. --- src/compiler/glsl_types.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h index 55faac2..2857dc9 100644 --- a/src/compiler/glsl_types.h +++ b/src/compiler/glsl_types.h @@ -70,20 +70,31 @@ enum glsl_base_type { static inline bool glsl_base_type_is_64bit(enum glsl_base_type type) { return type == GLSL_TYPE_DOUBLE || type == GLSL_TYPE_UINT64 || type == GLSL_TYPE_INT64 || type == GLSL_TYPE_IMAGE || type == GLSL_TYPE_SAMPLER; } +static inline bool glsl_base_type_is_integer(enum glsl_base_type type) +{ + return type == GLSL_TYPE_UINT || + type == GLSL_TYPE_INT || + type == GLSL_TYPE_UINT64 || + type == GLSL_TYPE_INT64 || + type == GLSL_TYPE_BOOL || + type == GLSL_TYPE_SAMPLER || + type == GLSL_TYPE_IMAGE; +} + enum glsl_sampler_dim { GLSL_SAMPLER_DIM_1D = 0, GLSL_SAMPLER_DIM_2D, GLSL_SAMPLER_DIM_3D, GLSL_SAMPLER_DIM_CUBE, GLSL_SAMPLER_DIM_RECT, GLSL_SAMPLER_DIM_BUF, GLSL_SAMPLER_DIM_EXTERNAL, GLSL_SAMPLER_DIM_MS, GLSL_SAMPLER_DIM_SUBPASS, /* for vulkan input attachments */ -- 2.9.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev