u_format: Use the nice helper for reversing an array.
authorEmma Anholt <emma@anholt.net>
Tue, 1 Jun 2021 20:37:56 +0000 (13:37 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 3 Jun 2021 00:12:39 +0000 (00:12 +0000)
Acked-by: Adam Jackson <ajax@redhat.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10505>

src/util/format/u_format_parse.py

index 395376d..2a5edab 100644 (file)
@@ -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