panfrost: Fix support for packed 24-bit formats
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 9 Oct 2019 12:05:18 +0000 (14:05 +0200)
committerDaniel Stone <daniels@collabora.com>
Sun, 13 Oct 2019 12:44:25 +0000 (14:44 +0200)
pan_pack_color() color was missing the 24-bit packed format case.
Looks like putting the clear color in a 32-bit slot does the trick.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_job.c

index 8ba75cde6c4194d44e74a5480a1a3386b304a526..a10d4a37528fd9c80d7afd6eac78ca4e63c8c666 100644 (file)
@@ -1109,7 +1109,7 @@ pan_pack_color(uint32_t *packed, const union pipe_color_union *color, enum pipe_
                         pan_pack_color_32(packed, s | (s << 16));
                 } else if (size == 2)
                         pan_pack_color_32(packed, out.ui[0] | (out.ui[0] << 16));
-                else if (size == 4)
+                else if (size == 3 || size == 4)
                         pan_pack_color_32(packed, out.ui[0]);
                 else if (size == 8)
                         pan_pack_color_64(packed, out.ui[0], out.ui[1]);