panfrost: Add support for B5G5R5X1
authorIcecream95 <ixn@keemail.me>
Tue, 24 Mar 2020 00:09:30 +0000 (13:09 +1300)
committerMarge Bot <eric+marge@anholt.net>
Tue, 31 Mar 2020 00:48:58 +0000 (00:48 +0000)
Tested with texenv from mesa-demos.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4292>

src/panfrost/encoder/pan_format.c
src/panfrost/include/panfrost-job.h
src/panfrost/pandecode/pan_pretty_print.c

index 1b8cb4faef6f0a71e434f4f0b7fa9208c0a1e84f..26d3f7951ebc8a70d293c6318d7773af2a3e8ff4 100644 (file)
@@ -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;
 
index 4f1edeb8453efd71a18f22cbf4f8bae31a1b18a1..355eca9491a68514ae4033dc458345fbd5831159 100644 (file)
@@ -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,
index e0f00541f8ad7ca6de2172226930dcda933ac603..9f9852a7917e5911aad46b8cbf7ce6a044969056 100644 (file)
@@ -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);