Mesa (master): aco: ensure that uniform booleans are computed in WQM if their uses happen in WQM

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 21 18:15:37 UTC 2019


Module: Mesa
Branch: master
Commit: 0e4bd261b1535b5c1d38607545a54101cb1f3d01
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e4bd261b1535b5c1d38607545a54101cb1f3d01

Author: Daniel Schürmann <daniel at schuermann.dev>
Date:   Wed Oct 16 12:56:05 2019 +0200

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 at gmail.com>

---

 src/amd/compiler/aco_instruction_selection.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index fede0979bd2..203897d0d8f 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -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));
    }
 }
 




More information about the mesa-commit mailing list