pan/mfbd: Add format codes for PIPE_FORMAT_B5G5R5A1_UNORM
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sat, 16 May 2020 00:33:06 +0000 (20:33 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 19 May 2020 18:09:26 +0000 (18:09 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5069>

src/gallium/drivers/panfrost/pan_mfbd.c

index 131f396b21d93f2b0da71d40037c84217b1c30ee..723d92b0067274c7c911be94d69db637b1bd65ff 100644 (file)
@@ -92,6 +92,13 @@ panfrost_mfbd_format(struct pipe_surface *surf)
                 fmt.nr_channels = MALI_POSITIVE(1);
                 break;
 
+        case PIPE_FORMAT_B5G5R5A1_UNORM:
+        case PIPE_FORMAT_B5G5R5X1_UNORM:
+                fmt.unk1 = 0x18000000;
+                fmt.unk3 = 0x7;
+                fmt.nr_channels = MALI_POSITIVE(2);
+                break;
+
         /* Generic 8-bit */
         case PIPE_FORMAT_R8_UINT:
         case PIPE_FORMAT_R8_SINT:
@@ -122,7 +129,6 @@ panfrost_mfbd_format(struct pipe_surface *surf)
         case PIPE_FORMAT_R16_FLOAT:
         case PIPE_FORMAT_R16_UINT:
         case PIPE_FORMAT_R16_SINT:
-        case PIPE_FORMAT_B5G5R5A1_UNORM:
                 fmt.unk1 = 0x84000000;
                 fmt.unk3 = 0x0;
                 fmt.nr_channels = MALI_POSITIVE(2);