From 81d059c89859841bf6c4c74e29d2dd95f6dd93bf Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Tue, 24 Mar 2020 13:09:30 +1300 Subject: [PATCH] panfrost: Add support for B5G5R5X1 Tested with texenv from mesa-demos. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/encoder/pan_format.c | 3 +++ src/panfrost/include/panfrost-job.h | 1 + src/panfrost/pandecode/pan_pretty_print.c | 1 + 3 files changed, 5 insertions(+) diff --git a/src/panfrost/encoder/pan_format.c b/src/panfrost/encoder/pan_format.c index 1b8cb4faef6..26d3f7951eb 100644 --- a/src/panfrost/encoder/pan_format.c +++ b/src/panfrost/encoder/pan_format.c @@ -127,6 +127,9 @@ panfrost_find_format(const struct util_format_description *desc) case PIPE_FORMAT_B5G6R5_UNORM: return MALI_RGB565; + case PIPE_FORMAT_B5G5R5X1_UNORM: + return MALI_RGB5_X1_UNORM; + case PIPE_FORMAT_B5G5R5A1_UNORM: return MALI_RGB5_A1_UNORM; diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index 4f1edeb8453..355eca9491a 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -287,6 +287,7 @@ enum mali_format { MALI_ASTC_HDR_SUPP = MALI_FORMAT_COMPRESSED | 0x17, MALI_RGB565 = MALI_FORMAT_SPECIAL | 0x0, + MALI_RGB5_X1_UNORM = MALI_FORMAT_SPECIAL | 0x1, MALI_RGB5_A1_UNORM = MALI_FORMAT_SPECIAL | 0x2, MALI_RGB10_A2_UNORM = MALI_FORMAT_SPECIAL | 0x3, MALI_RGB10_A2_SNORM = MALI_FORMAT_SPECIAL | 0x5, diff --git a/src/panfrost/pandecode/pan_pretty_print.c b/src/panfrost/pandecode/pan_pretty_print.c index e0f00541f8a..9f9852a7917 100644 --- a/src/panfrost/pandecode/pan_pretty_print.c +++ b/src/panfrost/pandecode/pan_pretty_print.c @@ -46,6 +46,7 @@ char *pandecode_format(enum mali_format format) DEFINE_CASE(ASTC_SRGB_SUPP); DEFINE_CASE(ASTC_HDR_SUPP); DEFINE_CASE(RGB565); + DEFINE_CASE(RGB5_X1_UNORM); DEFINE_CASE(RGB5_A1_UNORM); DEFINE_CASE(RGB10_A2_UNORM); DEFINE_CASE(RGB10_A2_SNORM); -- 2.30.2