Mesa (master): etnaviv: Use the util_pack_color_union() helper.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 7 18:47:18 UTC 2020


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

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jul  1 16:14:40 2020 -0700

etnaviv: Use the util_pack_color_union() helper.

This snuck in since I cleaned up the other instances of it.

Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728>

---

 src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
index 7b0da00c6b1..b878dc976ab 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
@@ -73,13 +73,7 @@ etna_clear_blit_pack_rgba(enum pipe_format format, const union pipe_color_union
 {
    union util_color uc;
 
-   if (util_format_is_pure_uint(format)) {
-      util_format_write_4ui(format, color->ui, 0, &uc, 0, 0, 0, 1, 1);
-   } else if (util_format_is_pure_sint(format)) {
-      util_format_write_4i(format, color->i, 0, &uc, 0, 0, 0, 1, 1);
-   } else {
-      util_pack_color(color->f, format, &uc);
-   }
+   util_pack_color_union(format, &uc, color);
 
    switch (util_format_get_blocksize(format)) {
    case 1:



More information about the mesa-commit mailing list