Mesa (master): panfrost: Fix support for packed 24-bit formats

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Oct 13 13:08:14 UTC 2019


Module: Mesa
Branch: master
Commit: 35e92a11ddb1450571afc2d66286b97098d486a1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=35e92a11ddb1450571afc2d66286b97098d486a1

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Wed Oct  9 14:05:18 2019 +0200

panfrost: Fix support for packed 24-bit formats

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 at collabora.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 src/gallium/drivers/panfrost/pan_job.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 8ba75cde6c4..a10d4a37528 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -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]);




More information about the mesa-commit mailing list