From c144f988e179e722feaa2fed030db166045ef496 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 27 Apr 2021 15:47:31 -0700 Subject: [PATCH] u_format: Assert that array formats don't include BE swizzles. Z32_FLOAT_S8X24_UINT and X32_S8X24_UINT are in fact the only non-bitmask formats that have BE swizzles specified, but sorting out those two is harder. Acked-by: Adam Jackson Acked-by: Ilia Mirkin Part-of: --- src/util/format/u_format_parse.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/format/u_format_parse.py b/src/util/format/u_format_parse.py index 2a5edab0461..aba4e29ee36 100644 --- a/src/util/format/u_format_parse.py +++ b/src/util/format/u_format_parse.py @@ -129,6 +129,10 @@ class Format: le_shift += channel.size if be_channels: + if self.is_array(): + print( + "{} is an array format and should not include BE swizzles in the CSV".format(self.name)) + exit(1) self.be_channels = be_channels self.be_swizzles = be_swizzles else: