From e180374ab131374043d5ae5405238cd30f52bcbd Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 3 May 2021 12:11:26 -0400 Subject: [PATCH] pan/bi: Add single-component 8-bit mkvec lowering So we can implement scalar i2i8. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bifrost_compile.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index a27a7dc8b6a..6584cc45b2e 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -323,6 +323,10 @@ bi_make_vec_to(bi_builder *b, bi_index final_dst, } } else if (bitsize == 16) { bi_make_vec16_to(b, dst, src, channel, count); + } else if (bitsize == 8 && count == 1) { + bi_swz_v4i8_to(b, dst, bi_byte( + bi_word(src[0], channel[0] >> 2), + channel[0] & 3)); } else { unreachable("8-bit mkvec not yet supported"); }