aco: run p_wqm instructions in WQM
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 13 Jan 2020 14:53:56 +0000 (14:53 +0000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Jan 2020 13:23:03 +0000 (13:23 +0000)
If the p_wqm ends up creating copies, these need to be in WQM. Helps (but
doesn't completely fix) artifacts in Strange Brigade. The actual issue
still exists and is harder to fix.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3273>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3273>

src/amd/compiler/aco_insert_exec_mask.cpp

index 9981828bad3b1ecf45b107e584171b32cc744be1..bf7ccf8b57030054680a039fa3abe9fdafe8739e 100644 (file)
@@ -246,8 +246,9 @@ void get_block_needs(wqm_ctx &ctx, exec_ctx &exec_ctx, Block* block)
          }
       }
 
-      if (instr->opcode == aco_opcode::p_logical_end && info.logical_end_wqm) {
-         assert(needs == Unspecified);
+      if ((instr->opcode == aco_opcode::p_logical_end && info.logical_end_wqm) ||
+          instr->opcode == aco_opcode::p_wqm) {
+         assert(needs != Exact);
          needs = WQM;
       }