formats: Cast enum to int before shifting

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35247>
This commit is contained in:
Jesse Natalie
2025-05-29 16:54:41 -07:00
committed by Marge Bot
parent f0dde6ca7f
commit ae3c495de1
+1 -1
View File
@@ -189,7 +189,7 @@ _mesa_array_format_get_datatype(mesa_array_format f)
static inline int
_mesa_array_format_datatype_get_size(enum mesa_array_format_datatype type)
{
return 1 << (type & MESA_ARRAY_FORMAT_TYPE_SIZE_MASK);
return 1 << ((int)type & MESA_ARRAY_FORMAT_TYPE_SIZE_MASK);
}
static inline int