From: Eric Anholt Date: Wed, 1 Jul 2020 23:14:40 +0000 (-0700) Subject: etnaviv: Use the util_pack_color_union() helper. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=377026e3ada356b3db47d8aed5c383d9321c1001;p=mesa.git etnaviv: Use the util_pack_color_union() helper. This snuck in since I cleaned up the other instances of it. Reviewed-by: Christian Gmeiner Reviewed-by: Marek Olšák Part-of: --- 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: