Mesa (master): lima/gpir: Ignore unscheduled successors in can_use_complex()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 9 11:15:33 UTC 2019


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

Author: Connor Abbott <cwabbott0 at gmail.com>
Date:   Mon Sep  2 09:48:54 2019 +0200

lima/gpir: Ignore unscheduled successors in can_use_complex()

The point of the function is to avoid creating a complex move which is
used by certain slots in the next instruction, but unscheduled
successors will never be in the next instruction. Found while debugging
a crash that the previous commit fixed.

Reviewed-by: Vasily Khoruzhick <anarsoul at gmail.com>
Tested-by: Vasily Khoruzhick <anarsoul at gmail.com>

---

 src/gallium/drivers/lima/ir/gp/scheduler.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/lima/ir/gp/scheduler.c b/src/gallium/drivers/lima/ir/gp/scheduler.c
index 9900ceaa041..bfb64543e06 100644
--- a/src/gallium/drivers/lima/ir/gp/scheduler.c
+++ b/src/gallium/drivers/lima/ir/gp/scheduler.c
@@ -1154,7 +1154,8 @@ static bool can_use_complex(gpir_node *node)
          continue;
 
       gpir_node *succ = dep->succ;
-      if (succ->type != gpir_node_type_alu)
+      if (succ->type != gpir_node_type_alu ||
+          !succ->sched.instr)
          continue;
 
       /* Note: this must be consistent with gpir_codegen_{mul,add}_slot{0,1}




More information about the mesa-commit mailing list