asahi: Fix compressed ZS support
authorAsahi Lina <lina@asahilina.net>
Wed, 5 Apr 2023 16:42:51 +0000 (01:42 +0900)
committerMarge Bot <emma+marge@anholt.net>
Fri, 7 Apr 2023 03:23:04 +0000 (03:23 +0000)
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 <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22353>

src/gallium/drivers/asahi/agx_pipe.c

index 7cc4164..04e10bc 100644 (file)
@@ -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;
    }