ir3: fix shift amount for 8-bit shifts

Follow the 16-bit approach and convert shift amount to 8b for 8b shift
instructions.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26817>
This commit is contained in:
Dmitry Baryshkov
2023-10-22 09:47:41 +00:00
committed by Marge Bot
parent e7f3112eb9
commit 3f25a73f17
+5 -3
View File
@@ -294,10 +294,12 @@ static struct ir3_instruction *
resize_shift_amount(struct ir3_context *ctx, struct ir3_instruction *src,
unsigned bs)
{
if (bs != 16)
if (bs == 16)
return ir3_COV(ctx->block, src, TYPE_U32, TYPE_U16);
else if (bs == 8)
return ir3_COV(ctx->block, src, TYPE_U32, TYPE_U8);
else
return src;
return ir3_COV(ctx->block, src, TYPE_U32, TYPE_U16);
}
static void