panvk: fix bi_emit_alu calling bi_make_vec_to
bi_emit_alu needs to fully set the vector of bi_index pass to
bi_make_vec_to, as it is expected by the callee.
Fixes: 3cc6a4c5 ("pan/bi: Handle swizzles in i2i8")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35642>
This commit is contained in:
@@ -2978,11 +2978,14 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
|
||||
bi_index idx = bi_src_index(&instr->src[0].src);
|
||||
unsigned factor = src_sz / 8;
|
||||
unsigned chan[4] = {0};
|
||||
bi_index idxs[4];
|
||||
|
||||
for (unsigned i = 0; i < comps; ++i)
|
||||
for (unsigned i = 0; i < comps; ++i) {
|
||||
idxs[i] = idx;
|
||||
chan[i] = instr->src[0].swizzle[i] * factor;
|
||||
}
|
||||
|
||||
bi_make_vec_to(b, dst, &idx, chan, comps, 8);
|
||||
bi_make_vec_to(b, dst, idxs, chan, comps, 8);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user