aco: ensure that uniform booleans are computed in WQM if their uses happen in WQM

This fixes graphical corruption in SC2.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
This commit is contained in:
Daniel Schürmann
2019-10-16 12:56:05 +02:00
committed by Rhys Perry
parent a9a9249288
commit 0e4bd261b1

View File

@@ -321,7 +321,8 @@ Temp as_uniform_bool(isel_context *ctx, Temp val)
} else {
assert(val.regClass() == s2);
Builder bld(ctx->program, ctx->block);
return bld.sopc(aco_opcode::s_cmp_lg_u64, bld.def(s1, scc), Operand(0u), Operand(val));
/* if we're currently in WQM mode, ensure that the source is also computed in WQM */
return bld.sopc(aco_opcode::s_cmp_lg_u64, bld.def(s1, scc), Operand(0u), emit_wqm(ctx, val));
}
}