mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
pan/bit: Update f32->f16 convert test
Needs a second argument to be consistent with the real IR and the
hardware instruction.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 8a4efe2d73 ("pan/bi: Pack second argument of F32_TO_F16")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6142>
This commit is contained in:
parent
cf8a8b764e
commit
aa989aed6d
2 changed files with 8 additions and 7 deletions
|
|
@ -489,13 +489,7 @@ bit_step(struct bit_state *s, bi_instruction *ins, bool FMA)
|
|||
dest.i32 = bit_as_int32(ins->src_types[0], srcs[0], comp, ins->roundmode);
|
||||
else if (ins->dest_type == nir_type_float16) {
|
||||
dest.u16[0] = bit_as_float16(ins->src_types[0], srcs[0], ins->swizzle[0][0]);
|
||||
|
||||
if (ins->src_types[0] == nir_type_float32) {
|
||||
/* TODO: Second argument */
|
||||
dest.u16[1] = 0;
|
||||
} else {
|
||||
dest.u16[1] = bit_as_float16(ins->src_types[0], srcs[0], ins->swizzle[0][1]);
|
||||
}
|
||||
dest.u16[1] = bit_as_float16(ins->src_types[0], srcs[0], ins->swizzle[0][1]);
|
||||
} else if (ins->dest_type == nir_type_uint16) {
|
||||
dest.u16[0] = bit_as_uint16(ins->src_types[0], srcs[0], ins->swizzle[0][0], ins->roundmode);
|
||||
dest.u16[1] = bit_as_uint16(ins->src_types[0], srcs[0], ins->swizzle[0][1], ins->roundmode);
|
||||
|
|
|
|||
|
|
@ -488,6 +488,13 @@ bit_convert_helper(struct panfrost_device *dev, unsigned from_size,
|
|||
ins.swizzle[0][0] = cx;
|
||||
ins.swizzle[0][1] = cy;
|
||||
|
||||
if (to_size == 16 && from_size == 32) {
|
||||
ins.src_types[1] = ins.src_types[0];
|
||||
ins.src[1] = ins.src[0];
|
||||
} else {
|
||||
ins.src[1] = ins.src_types[1] = 0;
|
||||
}
|
||||
|
||||
bit_test_single(dev, &ins, input, FMA, debug);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue