mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 19:30:12 +01:00
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:
parent
9bed04c5a6
commit
c1d6d745cf
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue