Module: Mesa
Branch: master
Commit: e797caa0dd7a63397354073559637843ae78135b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e797caa0dd7a63397354073559637843ae78135b

Author: Alyssa Rosenzweig <[email protected]>
Date:   Thu Jul 18 12:10:39 2019 -0700

panfrost: Zero polygon list body size for clears

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 <[email protected]>

---

 src/gallium/drivers/panfrost/pan_tiler.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/panfrost/pan_tiler.c 
b/src/gallium/drivers/panfrost/pan_tiler.c
index fc0de7d8842..25f8490cb43 100644
--- a/src/gallium/drivers/panfrost/pan_tiler.c
+++ b/src/gallium/drivers/panfrost/pan_tiler.c
@@ -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);
 }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to