From 9db36376a687c103a5405c34fa1bd31a0371ed2a Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Thu, 6 Apr 2023 01:42:51 +0900 Subject: [PATCH] asahi: Fix compressed ZS support Depth/stencil formats are "not renderable" but do support compression. I swear I already fixed this at some point and the commit must've fallen through the cracks... Signed-off-by: Asahi Lina Part-of: --- src/gallium/drivers/asahi/agx_pipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 7cc416498aa..04e10bc22f2 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -405,7 +405,8 @@ agx_compression_allowed(const struct agx_resource *pres) * renderable formats. As framebuffer compression, other formats don't make a * ton of sense to compress anyway. */ - if (!agx_pixel_format[pres->base.format].renderable) { + if (!agx_pixel_format[pres->base.format].renderable && + !util_format_is_depth_or_stencil(pres->base.format)) { rsrc_debug(pres, "No compression: format not renderable\n"); return false; }