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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user