pan/bi: Don't swizzle scalars
Pointless, already replicated. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10627>
This commit is contained in:
committed by
Marge Bot
parent
578f5d0000
commit
f21248c3c2
@@ -74,6 +74,11 @@ bi_lower_swizzle_16(bi_context *ctx, bi_instr *ins, unsigned src)
|
||||
if (ins->src[src].swizzle == BI_SWIZZLE_H01)
|
||||
return;
|
||||
|
||||
/* 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)
|
||||
return;
|
||||
|
||||
/* Lower it away */
|
||||
bi_builder b = bi_init_builder(ctx, bi_before_instr(ins));
|
||||
ins->src[src] = bi_replace_index(ins->src[src],
|
||||
|
||||
Reference in New Issue
Block a user