pan/bi: Change swizzled scalars to identity

Allows packing for things like IADD.v2s16

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>
This commit is contained in:
Alyssa Rosenzweig
2021-05-04 12:01:06 -04:00
committed by Marge Bot
parent b7a757b2f7
commit 3d78cc5876
+3
View File
@@ -77,7 +77,10 @@ bi_lower_swizzle_16(bi_context *ctx, bi_instr *ins, unsigned src)
/* If the instruction is scalar we can ignore the other component */
if (ins->dest[0].swizzle == BI_SWIZZLE_H00 &&
ins->src[src].swizzle == BI_SWIZZLE_H00)
{
ins->src[src].swizzle = BI_SWIZZLE_H01;
return;
}
/* Lower it away */
bi_builder b = bi_init_builder(ctx, bi_before_instr(ins));