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