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

Author: Icecream95 <[email protected]>
Date:   Wed Feb  3 22:33:12 2021 +1300

panfrost: Fix clear color packing for 12-byte formats

Make the case for 6 bytes the same as for 8 while we're at it.

Reviewed-by: Boris Brezillon <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8886>

---

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

diff --git a/src/gallium/drivers/panfrost/pan_job.c 
b/src/gallium/drivers/panfrost/pan_job.c
index ae3f78b941e..f4ca59fc647 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -1317,11 +1317,9 @@ 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)
+                else if (size == 6 || size == 8)
                         pan_pack_color_64(packed, out.ui[0], out.ui[1]);
-                else if (size == 16)
+                else if (size == 12 || size == 16)
                         memcpy(packed, out.ui, 16);
                 else
                         unreachable("Unknown generic format size packing clear 
colour");

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to