[Mesa-dev] [PATCH 08/20] panfrost: Z/S can't be tiled

Alyssa Rosenzweig alyssa.rosenzweig at collabora.com
Mon Jun 24 17:39:11 UTC 2019


As far as we know, Utgard-style tiling only works for color render
targets, not depth/stencil, so ensure we don't try to tile it (rather
than compress or plain old linear) and drive ourselves into a corner.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
 src/gallium/drivers/panfrost/pan_resource.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index 027cd61f16d..961cecf8cf0 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -295,6 +295,9 @@ panfrost_create_bo(struct panfrost_screen *screen, const struct pipe_resource *t
 
         bool should_tile = is_streaming && is_texture && is_2d;
 
+        /* Depth/stencil can't be tiled, only linear or AFBC */
+        should_tile &= !(template->bind & PIPE_BIND_DEPTH_STENCIL);
+
         /* Set the layout appropriately */
         bo->layout = should_tile ? PAN_TILED : PAN_LINEAR;
 
-- 
2.20.1



More information about the mesa-dev mailing list