From 377026e3ada356b3db47d8aed5c383d9321c1001 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Jul 2020 16:14:40 -0700 Subject: [PATCH] etnaviv: Use the util_pack_color_union() helper. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This snuck in since I cleaned up the other instances of it. Reviewed-by: Christian Gmeiner Reviewed-by: Marek Olšák Part-of: --- 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: -- 2.30.2