panfrost: Decode array textures
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 14 Jun 2019 23:23:32 +0000 (16:23 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 17 Jun 2019 15:36:14 +0000 (08:36 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/include/panfrost-job.h
src/gallium/drivers/panfrost/pandecode/decode.c

index 17a5d8f0e5076783f30a7e357c1bf79b5a1734d2..12200c373f1270518c5e3d7cec24629e9a7a9885 100644 (file)
@@ -1150,8 +1150,7 @@ struct mali_texture_descriptor {
         uint16_t width;
         uint16_t height;
         uint16_t depth;
-
-        uint16_t unknown1;
+        uint16_t array_size;
 
         struct mali_texture_format format;
 
index 90b2579a436357ebcbaf3a95002d69eb4841aee3..1f2564e45dcf832fca51768ac429a18b50bf72b8 100644 (file)
@@ -1508,8 +1508,7 @@ pandecode_replay_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix
                                         pandecode_prop("width = MALI_POSITIVE(%" PRId16 ")", t->width + 1);
                                         pandecode_prop("height = MALI_POSITIVE(%" PRId16 ")", t->height + 1);
                                         pandecode_prop("depth = MALI_POSITIVE(%" PRId16 ")", t->depth + 1);
-
-                                        pandecode_prop("unknown1 = %" PRId16, t->unknown1);
+                                        pandecode_prop("array_size = MALI_POSITIVE(%" PRId16 ")", t->array_size + 1);
                                         pandecode_prop("unknown3 = %" PRId16, t->unknown3);
                                         pandecode_prop("unknown3A = %" PRId8, t->unknown3A);
                                         pandecode_prop("nr_mipmap_levels = %" PRId8, t->nr_mipmap_levels);
@@ -1559,6 +1558,9 @@ pandecode_replay_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix
                                         if (!f.is_not_cubemap)
                                                 bitmap_count *= 6;
 
+                                        /* Array of textures */
+                                        bitmap_count *= MALI_NEGATIVE(t->array_size);
+
                                         /* Stride for each element */
                                         if (manual_stride)
                                                 bitmap_count *= 2;