mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
pan/bi: Simplify unpack_64_2x32_split_*
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
This commit is contained in:
parent
79f8c1ca9a
commit
a5801b1a23
1 changed files with 7 additions and 10 deletions
|
|
@ -2976,17 +2976,14 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
|
|||
return;
|
||||
}
|
||||
|
||||
case nir_op_unpack_64_2x32_split_x: {
|
||||
unsigned chan = (instr->src[0].swizzle[0] * 2) + 0;
|
||||
bi_mov_i32_to(b, dst,
|
||||
bi_extract(b, bi_src_index(&instr->src[0].src), chan));
|
||||
return;
|
||||
}
|
||||
|
||||
case nir_op_unpack_64_2x32_split_x:
|
||||
case nir_op_unpack_64_2x32_split_y: {
|
||||
unsigned chan = (instr->src[0].swizzle[0] * 2) + 1;
|
||||
bi_mov_i32_to(b, dst,
|
||||
bi_extract(b, bi_src_index(&instr->src[0].src), chan));
|
||||
bi_index idx = bi_src_index(&instr->src[0].src);
|
||||
|
||||
unsigned offset = instr->op == nir_op_unpack_64_2x32_split_x ? 0 : 1;
|
||||
unsigned chan = instr->src[0].swizzle[0] * 2 + offset;
|
||||
|
||||
bi_mov_i32_to(b, dst, bi_extract(b, idx, chan));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue