From 27d3685528bc7ee79e94738af8f6bee1a4f8b795 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 4 Jun 2020 17:35:40 -0400 Subject: [PATCH] panfrost: Enable AFBC for RGB565 Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/encoder/pan_afbc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/panfrost/encoder/pan_afbc.c b/src/panfrost/encoder/pan_afbc.c index 27dacabddf3..272a7133478 100644 --- a/src/panfrost/encoder/pan_afbc.c +++ b/src/panfrost/encoder/pan_afbc.c @@ -92,9 +92,16 @@ panfrost_format_supports_afbc(enum pipe_format format) if (util_format_is_rgba8_variant(desc)) return true; - /* Gross, but probably good enough */ - if (format == PIPE_FORMAT_R8G8B8_UNORM) + /* List some special formats */ + switch (format) { + case PIPE_FORMAT_R8G8B8_UNORM: + case PIPE_FORMAT_B8G8R8_UNORM: + case PIPE_FORMAT_R5G6B5_UNORM: + case PIPE_FORMAT_B5G6R5_UNORM: return true; + default: + break; + } /* Only Z24S8 variants are compressible as Z/S */ -- 2.30.2