st/mesa: Fall back on R3G3B2 for R3_G3_B2
authorIcecream95 <ixn@keemail.me>
Tue, 24 Mar 2020 01:45:45 +0000 (14:45 +1300)
committerMarge Bot <eric+marge@anholt.net>
Tue, 31 Mar 2020 00:48:58 +0000 (00:48 +0000)
It's simpler for Panfrost to use R3G3B2 instead of B2G3R3, but
format_map only listed the BGR variation.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4292>

src/mesa/state_tracker/st_format.c

index 310c5b62ab7b21adc63a7500199510329b292cda..99e91ca96dec0bd3e797d7fbd2f9b11a308b43f8 100644 (file)
@@ -229,8 +229,9 @@ static const struct format_mapping format_map[] = {
    },
    {
       { GL_R3_G3_B2, 0 },
-      { PIPE_FORMAT_B2G3R3_UNORM, PIPE_FORMAT_B5G6R5_UNORM,
-        PIPE_FORMAT_B5G5R5A1_UNORM, DEFAULT_RGB_FORMATS }
+      { PIPE_FORMAT_B2G3R3_UNORM, PIPE_FORMAT_R3G3B2_UNORM,
+        PIPE_FORMAT_B5G6R5_UNORM, PIPE_FORMAT_B5G5R5A1_UNORM,
+        DEFAULT_RGB_FORMATS }
    },
    {
       { GL_RGB4 },