mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
pan/va: Fix nir_op_pack_uvec4_to_uint
We don't have a generic v4i8 on Valhall, we have to lower it to two
v2i8. Fortunately, bi_make_vec_to() hides the Bifrost/Valhall
differences, so use that for nir_op_pack_uvec4_to_uint.
Fixes: 934b0f1add ("pan/bi: Respect swizzles for more vector ops")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31280>
This commit is contained in:
parent
35ea8b6cd2
commit
dc1a7b94a8
1 changed files with 9 additions and 5 deletions
|
|
@ -2462,11 +2462,15 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
|
|||
bi_index src = bi_src_index(&instr->src[0].src);
|
||||
|
||||
assert(sz == 32 && src_sz == 32);
|
||||
bi_mkvec_v4i8_to(
|
||||
b, dst, bi_byte(bi_extract(b, src, instr->src[0].swizzle[0]), 0),
|
||||
bi_byte(bi_extract(b, src, instr->src[0].swizzle[1]), 0),
|
||||
bi_byte(bi_extract(b, src, instr->src[0].swizzle[2]), 0),
|
||||
bi_byte(bi_extract(b, src, instr->src[0].swizzle[3]), 0));
|
||||
|
||||
bi_index srcs[4] = {
|
||||
bi_extract(b, src, instr->src[0].swizzle[0]),
|
||||
bi_extract(b, src, instr->src[0].swizzle[1]),
|
||||
bi_extract(b, src, instr->src[0].swizzle[2]),
|
||||
bi_extract(b, src, instr->src[0].swizzle[3]),
|
||||
};
|
||||
unsigned channels[4] = {0};
|
||||
bi_make_vec_to(b, dst, srcs, channels, 4, 8);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue