For inexplicable reasons, the depth buffer is faster if kept as linear,
whereas the colour buffers are faster if AFBC. Given both code paths are
available, we'll choose the faster one of each (which also helps with
testing coverage).
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
panfrost_attach_vt_framebuffer(ctx);
panfrost_set_scissor(ctx);
- struct panfrost_resource *tex = ((struct panfrost_resource *) ctx->pipe_framebuffer.zsbuf->texture);
-
- if (tex->bo->layout != PAN_AFBC && !panfrost_is_scanout(ctx))
- panfrost_enable_afbc(ctx, tex, true);
+ /* Keep the depth FBO linear */
}
}
}
/* Tiling textures is almost always faster, unless we only use it once */
bool should_tile = (template->usage != PIPE_USAGE_STREAM) && (template->bind & PIPE_BIND_SAMPLER_VIEW);
+ /* For unclear reasons, depth/stencil is faster linear than AFBC, so
+ * make sure it's linear */
+
+ if (template->bind & PIPE_BIND_DEPTH_STENCIL)
+ should_tile = false;
+
/* Set the layout appropriately */
bo->layout = should_tile ? PAN_TILED : PAN_LINEAR;