pan/lower_framebuffer: Don't open-code pan_unpacked_type_for_format

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383>
This commit is contained in:
Alyssa Rosenzweig
2021-06-15 12:45:31 -04:00
committed by Marge Bot
parent 5fe35012c9
commit 82a6b38d8c
+2 -9
View File
@@ -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));