panfrost: Zero polygon list body size for clears
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 18 Jul 2019 19:10:39 +0000 (12:10 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 18 Jul 2019 22:25:40 +0000 (15:25 -0700)
There's no polygons, so you can't have any size to the polygon list,
although there is a minimal header.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_tiler.c

index fc0de7d8842ddbb955a4b8e3518ab50cef8b237e..25f8490cb43beac781f50c32ed6ed52b234b0cc9 100644 (file)
@@ -264,6 +264,10 @@ panfrost_tiler_header_size(unsigned width, unsigned height, uint8_t mask)
 unsigned
 panfrost_tiler_body_size(unsigned width, unsigned height, uint8_t mask)
 {
+        /* No levels means no body */
+        if (!mask)
+                return 0x00;
+
         unsigned header_size = panfrost_tiler_header_size(width, height, mask);
         return ALIGN_POT(header_size * 512 / 8, 512);
 }