panfrost: Enable AFBC for Z24X8
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 15 May 2020 23:21:52 +0000 (19:21 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 19 May 2020 18:09:26 +0000 (18:09 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5069>

src/panfrost/encoder/pan_afbc.c

index cb429e4f8c0bf46e86cf5dc8088e92fc244778ed..26ba7489ec3cdb32fbcc132f6a57c8e8a5579251 100644 (file)
@@ -92,12 +92,9 @@ panfrost_format_supports_afbc(enum pipe_format format)
         if (util_format_is_rgba8_variant(desc))
                 return true;
 
-        /* Z32/Z16/S8 are all compressible as well, but they are implemented as
-         * Z24S8 with wasted bits. So Z24S8 is the only format we actually need
-         * to handle compressed, and we can make the gallium frontend deal with
-         * the rest. */
+        /* Only Z24S8 variants are compressible as Z/S */
 
-        if (format == PIPE_FORMAT_Z24_UNORM_S8_UINT)
+        if (panfrost_is_z24s8_variant(format))
                 return true;
 
         /* TODO: AFBC of other formats */