pan/decode: Guard attribute unknowns
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 20 Aug 2019 20:19:40 +0000 (13:19 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 21 Aug 2019 15:40:54 +0000 (08:40 -0700)
One should be zero. The other has always been seen as set, so check
this.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/pandecode/decode.c

index 08f67e2ee8406d7a11f87817c93e4af1e0842220..fe0c33048c3ff4b680cfe418e6bb21093c6f7dbf 100644 (file)
@@ -1396,8 +1396,16 @@ pandecode_attribute_meta(int job_no, int count, const struct mali_vertex_tiler_p
                 pandecode_swizzle(attr_meta->swizzle);
                 pandecode_prop("format = %s", pandecode_format(attr_meta->format));
 
-                pandecode_prop("unknown1 = 0x%" PRIx64, (u64) attr_meta->unknown1);
-                pandecode_prop("unknown3 = 0x%" PRIx64, (u64) attr_meta->unknown3);
+                if (attr_meta->unknown1 != 0x2) {
+                        pandecode_msg("XXX: expected unknown1 = 0x2\n");
+                        pandecode_prop("unknown1 = 0x%" PRIx64, (u64) attr_meta->unknown1);
+                }
+
+                if (attr_meta->unknown3) {
+                        pandecode_msg("XXX: unexpected unknown3 set\n");
+                        pandecode_prop("unknown3 = 0x%" PRIx64, (u64) attr_meta->unknown3);
+                }
+
                 pandecode_prop("src_offset = %d", attr_meta->src_offset);
                 pandecode_indent--;
                 pandecode_log("},\n");