diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-04-27 14:14:34 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-28 17:17:48 +0000 |
commit | df486689c07d3965c9e4efa5d9444b91aecdc208 (patch) | |
tree | 494595a5220537a9fa8dfa4c8d1a556f9a33805b /src/panfrost | |
parent | 814f2f1d33e0215a207f1dbeed645979daa21745 (diff) |
pan/bi(t): Fix SELECT tests
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4789>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/bifrost/bi_pack.c | 2 | ||||
-rw-r--r-- | src/panfrost/bifrost/test/bi_interpret.c | 4 | ||||
-rw-r--r-- | src/panfrost/bifrost/test/bi_test_pack.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c index ee85fad6fe2..5ae911e3548 100644 --- a/src/panfrost/bifrost/bi_pack.c +++ b/src/panfrost/bifrost/bi_pack.c @@ -1279,7 +1279,7 @@ bi_pack_add_tex_compact(bi_clause *clause, bi_instruction *ins, struct bi_regist static unsigned bi_pack_add_select(bi_instruction *ins, struct bi_registers *regs) { - unsigned size = nir_alu_type_get_type_size(ins->dest_type); + unsigned size = nir_alu_type_get_type_size(ins->src_types[0]); assert(size == 16); unsigned swiz = (ins->swizzle[0][0] | (ins->swizzle[1][0] << 1)); diff --git a/src/panfrost/bifrost/test/bi_interpret.c b/src/panfrost/bifrost/test/bi_interpret.c index 182a012bd78..449770bf833 100644 --- a/src/panfrost/bifrost/test/bi_interpret.c +++ b/src/panfrost/bifrost/test/bi_interpret.c @@ -530,10 +530,10 @@ bit_step(struct bit_state *s, bi_instruction *ins, bool FMA) } case BI_SELECT: { - if (ins->dest_type == nir_type_uint16) { + if (ins->src_types[0] == nir_type_uint16) { for (unsigned c = 0; c < 2; ++c) dest.u16[c] = srcs[c].u16[ins->swizzle[c][0]]; - } else if (ins->dest_type == nir_type_uint8) { + } else if (ins->src_types[0] == nir_type_uint8) { for (unsigned c = 0; c < 4; ++c) dest.u8[c] = srcs[c].u8[ins->swizzle[c][0]]; } else { diff --git a/src/panfrost/bifrost/test/bi_test_pack.c b/src/panfrost/bifrost/test/bi_test_pack.c index cdbb1a27edd..a4d86855eb9 100644 --- a/src/panfrost/bifrost/test/bi_test_pack.c +++ b/src/panfrost/bifrost/test/bi_test_pack.c @@ -543,6 +543,6 @@ bit_packing(struct panfrost_device *dev, enum bit_debug debug) bit_fma_mscale_helper(dev, mscale_input, debug); for (unsigned sz = 8; sz <= 16; sz *= 2) { - bit_select_helper(dev, (uint32_t *) input32, 8, debug); + bit_select_helper(dev, (uint32_t *) input32, sz, debug); } } |