panfrost/decode: Decode all cubemap faces
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Thu, 28 Mar 2019 01:59:02 +0000 (01:59 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 31 Mar 2019 02:36:38 +0000 (02:36 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/pandecode/decode.c

index 86fb968e3340d10a234fb4af2328a2c939d56c73..966bce6ebd7db81a6f3e0b83d4d017e118e98c63 100644 (file)
@@ -1463,7 +1463,13 @@ pandecode_replay_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix
                                         pandecode_log(".swizzled_bitmaps = {\n");
                                         pandecode_indent++;
 
-                                        int bitmap_count = 1 + t->nr_mipmap_levels + t->unknown3A;
+                                        int bitmap_count = MALI_NEGATIVE(t->nr_mipmap_levels);
+
+                                        if (!f.is_not_cubemap) {
+                                                /* Miptree for each face */
+                                                bitmap_count *= 6;
+                                        }
+
                                         int max_count = sizeof(t->swizzled_bitmaps) / sizeof(t->swizzled_bitmaps[0]);
 
                                         if (bitmap_count > max_count) {