diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-05-04 14:09:39 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-04 18:45:15 +0000 |
commit | 36e4ffa382f9f82ff6d7ed1dd4fc66010ed48fea (patch) | |
tree | 52a4b9a0fbf143113044d3eb1e6f0f07c12b521e /src/panfrost/bifrost | |
parent | 118d53bf93d8ad39238fca6b43111675b1602725 (diff) |
pan/bit: Use swizzle helper for round
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4890>
Diffstat (limited to 'src/panfrost/bifrost')
-rw-r--r-- | src/panfrost/bifrost/test/bi_test_pack.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/panfrost/bifrost/test/bi_test_pack.c b/src/panfrost/bifrost/test/bi_test_pack.c index 69b9f695e77..2f02db12c9b 100644 --- a/src/panfrost/bifrost/test/bi_test_pack.c +++ b/src/panfrost/bifrost/test/bi_test_pack.c @@ -346,15 +346,11 @@ bit_round_helper(struct panfrost_device *dev, uint32_t *input, unsigned sz, bool bi_instruction ins = bit_ins(BI_ROUND, 1, nir_type_float, sz); for (enum bifrost_roundmode mode = 0; mode <= 3; ++mode) { - for (unsigned swizzle = 0; swizzle < (sz == 16 ? 4 : 1); ++swizzle) { - if (sz == 16) { - for (unsigned i = 0; i < 2; ++i) - ins.swizzle[0][i] = ((swizzle >> i) & 1) ? 1 : 0; - } - - ins.roundmode = mode; - bit_test_single(dev, &ins, input, FMA, debug); - } + BIT_FOREACH_SWIZZLE(swz, 1, sz) { + bit_apply_swizzle(&ins, swz, 1, sz); + ins.roundmode = mode; + bit_test_single(dev, &ins, input, FMA, debug); + } } } |