panfrost: Decode nested structs correctly
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sat, 22 Aug 2020 00:22:33 +0000 (20:22 -0400)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Tue, 25 Aug 2020 15:05:33 +0000 (17:05 +0200)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 75cc5b8c292 ("panfrost: Adopt gen_pack_header.py via v3d")
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>

src/panfrost/lib/gen_pack.py

index 0266838f623876380656477df80172ed82db4b01..59890f7cd8a9d0e3b487a48fa850bd962f89f6ea 100644 (file)
@@ -416,7 +416,7 @@ class Group(object):
             # Recurse for structs, see pack() for validation
             if field.type in self.parser.structs:
                 pack_name = self.parser.gen_prefix(safe_name(field.type)).upper()
-                print("   {}_unpack(cl + {}, &values->{});".format(pack_name, field.start // 32, field.name))
+                print("   {}_unpack(cl + {}, &values->{});".format(pack_name, field.start // 8, field.name))
                 continue
 
             convert = None