struct panfrost_resource *tex = ((struct panfrost_resource *) ctx->pipe_framebuffer.cbufs[i]->texture);
enum pipe_format format = ctx->pipe_framebuffer.cbufs[i]->format;
- bool is_scanout = panfrost_is_scanout(ctx);
bool can_afbc = panfrost_format_supports_afbc(format);
+ bool is_scanout = panfrost_is_scanout(ctx);
if (!is_scanout && tex->bo->layout != PAN_AFBC && can_afbc)
panfrost_enable_afbc(ctx, tex, false);
pipe_surface_reference(&ctx->pipe_framebuffer.zsbuf, zb);
if (zb) {
- /* FBO has depth */
-
if (ctx->require_sfbd)
ctx->vt_framebuffer_sfbd = panfrost_emit_sfbd(ctx);
else
panfrost_attach_vt_framebuffer(ctx);
- /* Keep the depth FBO linear */
+ struct panfrost_resource *tex = pan_resource(zb->texture);
+ bool can_afbc = panfrost_format_supports_afbc(zb->format);
+ bool is_scanout = panfrost_is_scanout(ctx);
+
+ if (!is_scanout && tex->bo->layout != PAN_AFBC && can_afbc)
+ panfrost_enable_afbc(ctx, tex, true);
}
}
}
/* 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;