nir: get_base_type() should return enum type

Needed by the next patch, for c++ code which is more strict about
conversions between integers and enums.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5318>
This commit is contained in:
Rob Clark
2020-06-03 12:07:52 -07:00
committed by Marge Bot
parent dce7722ef8
commit 924bfb6560
+2 -2
View File
@@ -1023,10 +1023,10 @@ nir_alu_type_get_type_size(nir_alu_type type)
return type & NIR_ALU_TYPE_SIZE_MASK;
}
static inline unsigned
static inline nir_alu_type
nir_alu_type_get_base_type(nir_alu_type type)
{
return type & NIR_ALU_TYPE_BASE_TYPE_MASK;
return (nir_alu_type)(type & NIR_ALU_TYPE_BASE_TYPE_MASK);
}
static inline nir_alu_type