summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2019-09-26 15:38:09 +0100
committerRhys Perry <[email protected]>2019-09-27 10:57:03 +0100
commit1f2813e103b5e65a26c01c81e1e85953bea7a840 (patch)
treec580cf5d476a112c203607b631388fcdbccb026b /src/amd
parentb711e62e615095524a1af8dc4a6665bf1514a56c (diff)
aco: don't remove the loop exec mask in transition_to_Exact()
No pipeline-db changes. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/compiler/aco_insert_exec_mask.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_insert_exec_mask.cpp b/src/amd/compiler/aco_insert_exec_mask.cpp
index b423c5b9190..155c21a5aa4 100644
--- a/src/amd/compiler/aco_insert_exec_mask.cpp
+++ b/src/amd/compiler/aco_insert_exec_mask.cpp
@@ -313,7 +313,11 @@ void transition_to_Exact(exec_ctx& ctx, Builder bld, unsigned idx)
{
if (ctx.info[idx].exec.back().second & mask_type_exact)
return;
- if (ctx.info[idx].exec.back().second & mask_type_global) {
+ /* We can't remove the loop exec mask, because that can cause exec.size() to
+ * be less than num_exec_masks. The loop exec mask also needs to be kept
+ * around for various uses. */
+ if ((ctx.info[idx].exec.back().second & mask_type_global) &&
+ !(ctx.info[idx].exec.back().second & mask_type_loop)) {
ctx.info[idx].exec.pop_back();
assert(ctx.info[idx].exec.back().second & mask_type_exact);
ctx.info[idx].exec.back().first = bld.pseudo(aco_opcode::p_parallelcopy, bld.def(s2, exec),