aco: Fix emit_boolean_exclusive_scan in wave32 mode.

Use the lane mask instead of s2 for the register class.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6699>
(cherry picked from commit efa1c760d1)
This commit is contained in:
Timur Kristóf 2020-09-12 13:20:06 +02:00 committed by Eric Engestrom
parent 94faf66ad2
commit 0e1aa8daa3
2 changed files with 3 additions and 2 deletions

View file

@ -526,7 +526,7 @@
"description": "aco: Fix emit_boolean_exclusive_scan in wave32 mode.",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": null
},

View file

@ -7021,6 +7021,7 @@ Temp emit_boolean_reduce(isel_context *ctx, nir_op op, unsigned cluster_size, Te
Temp emit_boolean_exclusive_scan(isel_context *ctx, nir_op op, Temp src)
{
Builder bld(ctx->program, ctx->block);
assert(src.regClass() == bld.lm);
//subgroupExclusiveAnd(val) -> mbcnt(exec & ~val) == 0
//subgroupExclusiveOr(val) -> mbcnt(val & exec) != 0
@ -7029,7 +7030,7 @@ Temp emit_boolean_exclusive_scan(isel_context *ctx, nir_op op, Temp src)
if (op == nir_op_iand)
tmp = bld.sop2(Builder::s_andn2, bld.def(bld.lm), bld.def(s1, scc), Operand(exec, bld.lm), src);
else
tmp = bld.sop2(Builder::s_and, bld.def(s2), bld.def(s1, scc), src, Operand(exec, bld.lm));
tmp = bld.sop2(Builder::s_and, bld.def(bld.lm), bld.def(s1, scc), src, Operand(exec, bld.lm));
Builder::Result lohi = bld.pseudo(aco_opcode::p_split_vector, bld.def(s1), bld.def(s1), tmp);
Temp lo = lohi.def(0).getTemp();