panfrost: Remove RGTC emulation relic
authorAlyssa Rosenzweig <alyssa@collabora.com>
Wed, 14 Dec 2022 01:06:50 +0000 (20:06 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 16 Dec 2022 18:27:47 +0000 (18:27 +0000)
u_transfer_helper no longer emulates RGTC, so this code path is dead. RGTC
emulation now happens in the state tracker so the formats will work out
properly. (Similar to how other BCn formats are emulated in mesa/st.)

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20311>

src/gallium/drivers/panfrost/pan_resource.c

index 570eb8d..7b416e5 100644 (file)
@@ -854,14 +854,6 @@ pan_alloc_staging(struct panfrost_context *ctx, struct panfrost_resource *rsc,
 static enum pipe_format
 pan_blit_format(enum pipe_format fmt)
 {
-        const struct util_format_description *desc;
-        desc = util_format_description(fmt);
-
-        /* This must be an emulated format (using u_transfer_helper) as if it
-         * was real RGTC we wouldn't have used AFBC and needed a blit. */
-        if (desc->layout == UTIL_FORMAT_LAYOUT_RGTC)
-                fmt = PIPE_FORMAT_R8G8B8A8_UNORM;
-
         return fmt;
 }