panfrost: Implement tiled rendering
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 17 Jun 2019 22:56:48 +0000 (15:56 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 18 Jun 2019 16:59:29 +0000 (09:59 -0700)
We already can sample from Mali's linear/tiled encoding (the one from
Utgard -- AFBC is mostly unrelated); let's be able to render to it as
well.

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

index d2cccbe1a663eddea5d1e280986bc2768b6638cd..f9a69e47e45a74ccbfb2c3940915c599e58aea75 100644 (file)
@@ -104,6 +104,10 @@ panfrost_mfbd_set_cbuf(
                 rt->format.block = MALI_MFBD_BLOCK_LINEAR;
                 rt->framebuffer = rsrc->bo->gpu + offset;
                 rt->framebuffer_stride = stride / 16;
+        } else if (rsrc->bo->layout == PAN_TILED) {
+                rt->format.block = MALI_MFBD_BLOCK_TILED;
+                rt->framebuffer = rsrc->bo->gpu + offset;
+                rt->framebuffer_stride = stride;
         } else if (rsrc->bo->layout == PAN_AFBC) {
                 assert(level == 0);
                 rt->afbc.metadata = rsrc->bo->afbc_slab.gpu;