Mesa (master): panfrost: Handle RGB16F colour clear

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 2 23:03:49 UTC 2020


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Tue Dec 31 17:52:03 2019 -0500

panfrost: Handle RGB16F colour clear

We don't handle this format yet, but we will soon, and the abort in
pan_pack_color is possible even without exposing the format... Handling
this gracefully might not be required by the spec but let's not crash.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

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

diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index b193ce6fa76..208e287740a 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -1208,6 +1208,8 @@ pan_pack_color(uint32_t *packed, const union pipe_color_union *color, enum pipe_
                         pan_pack_color_32(packed, out.ui[0] | (out.ui[0] << 16));
                 else if (size == 3 || size == 4)
                         pan_pack_color_32(packed, out.ui[0]);
+                else if (size == 6)
+                        pan_pack_color_64(packed, out.ui[0], out.ui[1] | (out.ui[1] << 16)); /* RGB16F -- RGBB */
                 else if (size == 8)
                         pan_pack_color_64(packed, out.ui[0], out.ui[1]);
                 else if (size == 16)




More information about the mesa-commit mailing list