mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
pan/bi: Unify handling of unpack_*
These are just a fancy mov on Mali. We need to use bi_make_vec_to() because it handles 64-bit movs as well. 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
6cc10835b6
commit
79f8c1ca9a
1 changed files with 6 additions and 16 deletions
|
|
@ -2948,16 +2948,14 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
|
|||
return;
|
||||
}
|
||||
|
||||
case nir_op_unpack_32_2x16:
|
||||
case nir_op_unpack_32_4x8:
|
||||
case nir_op_unpack_32_2x16: {
|
||||
/* Should have been scalarized */
|
||||
assert(sz == 8 || sz == 16);
|
||||
assert(comps * sz == 32);
|
||||
|
||||
bi_index vec = bi_src_index(&instr->src[0].src);
|
||||
case nir_op_unpack_64_2x32:
|
||||
case nir_op_unpack_64_4x16: {
|
||||
assert(comps * sz == src_sz);
|
||||
bi_index idx = bi_src_index(&instr->src[0].src);
|
||||
unsigned chan = instr->src[0].swizzle[0];
|
||||
|
||||
bi_mov_i32_to(b, dst, bi_extract(b, vec, chan));
|
||||
bi_make_vec_to(b, dst, &idx, &chan, 1, src_sz);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2978,14 +2976,6 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
|
|||
return;
|
||||
}
|
||||
|
||||
case nir_op_unpack_64_2x32: {
|
||||
unsigned chan = (instr->src[0].swizzle[0] * 2) + 0;
|
||||
bi_index idx = bi_src_index(&instr->src[0].src);
|
||||
bi_collect_v2i32_to(b, dst, bi_extract(b, idx, chan + 0),
|
||||
bi_extract(b, idx, chan + 1));
|
||||
return;
|
||||
}
|
||||
|
||||
case nir_op_unpack_64_2x32_split_x: {
|
||||
unsigned chan = (instr->src[0].swizzle[0] * 2) + 0;
|
||||
bi_mov_i32_to(b, dst,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue