asahi,panfrost: Use IS_POT_NONZERO to replace util_is_power_of_two_nonzero for different size

This member's size are not fixed, so use IS_POT_NONZERO over it

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26909>
This commit is contained in:
Yonggang Luo 2024-01-04 18:40:05 +08:00 committed by Marge Bot
parent 9bed04c5a6
commit c1d6d745cf
2 changed files with 2 additions and 2 deletions

View file

@ -424,7 +424,7 @@ class Group(object):
elif field.modifier[0] == "minus":
print(" assert(values->{} >= {});".format(field.name, field.modifier[1]))
elif field.modifier[0] == "log2":
print(" assert(util_is_power_of_two_nonzero(values->{}));".format(field.name))
print(" assert(IS_POT_NONZERO(values->{}));".format(field.name))
for index in range(math.ceil(self.length / 4)):
# Handle MBZ words

View file

@ -463,7 +463,7 @@ class Group(object):
elif field.modifier[0] == "minus":
print(" assert(values->{} >= {});".format(field.name, field.modifier[1]))
elif field.modifier[0] == "log2":
print(" assert(util_is_power_of_two_nonzero(values->{}));".format(field.name))
print(" assert(IS_POT_NONZERO(values->{}));".format(field.name))
for index in range(self.length // 4):
# Handle MBZ words