From 6be9e094737aa9bf221724f14228bf2f1286bb2f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 15 May 2020 20:33:06 -0400 Subject: [PATCH] pan/mfbd: Add format codes for PIPE_FORMAT_B5G5R5A1_UNORM Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_mfbd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c index 131f396b21d..723d92b0067 100644 --- a/src/gallium/drivers/panfrost/pan_mfbd.c +++ b/src/gallium/drivers/panfrost/pan_mfbd.c @@ -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); -- 2.30.2