Mesa (main): u_format: Use the nice helper for reversing an array.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 3 00:44:43 UTC 2021
Module: Mesa
Branch: main
Commit: 397e80762edd26f65b92023cdbd51479f6d78f28
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=397e80762edd26f65b92023cdbd51479f6d78f28
Author: Emma Anholt <emma at anholt.net>
Date: Tue Jun 1 13:37:56 2021 -0700
u_format: Use the nice helper for reversing an array.
Acked-by: Adam Jackson <ajax at redhat.com>
Acked-by: Ilia Mirkin <imirkin at alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10505>
---
src/util/format/u_format_parse.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/format/u_format_parse.py b/src/util/format/u_format_parse.py
index 395376d0e5e..2a5edab0461 100644
--- a/src/util/format/u_format_parse.py
+++ b/src/util/format/u_format_parse.py
@@ -136,7 +136,7 @@ class Format:
self.be_swizzles = le_swizzles
be_shift = 0
- for channel in self.be_channels[3::-1]:
+ for channel in reversed(self.be_channels):
channel.shift = be_shift
be_shift += channel.size
More information about the mesa-commit
mailing list