From 82a6b38d8c6409ab989a13e7fc0f9ff78e28bb80 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 15 Jun 2021 12:45:31 -0400 Subject: [PATCH] pan/lower_framebuffer: Don't open-code pan_unpacked_type_for_format Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/util/pan_lower_framebuffer.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/panfrost/util/pan_lower_framebuffer.c b/src/panfrost/util/pan_lower_framebuffer.c index abe6abada93..6dd949f6c93 100644 --- a/src/panfrost/util/pan_lower_framebuffer.c +++ b/src/panfrost/util/pan_lower_framebuffer.c @@ -487,15 +487,8 @@ pan_lower_fb_load(nir_shader *shader, unsigned bits = nir_dest_bit_size(intr->dest); - nir_alu_type src_type; - if (desc->channel[0].pure_integer) { - if (desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) - src_type = nir_type_int; - else - src_type = nir_type_uint; - } else { - src_type = nir_type_float; - } + nir_alu_type src_type = nir_alu_type_get_base_type( + pan_unpacked_type_for_format(desc)); unpacked = nir_convert_to_bit_size(b, unpacked, src_type, bits); unpacked = nir_pad_vector(b, unpacked, nir_dest_num_components(intr->dest));