freedreno/ir3: hack to avoid getting stuck in a loop
There are still some edge cases which result in a neighbor-loop. Which needs to be fixed, but this hack at least makes deqp tests finish. Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
dd70945e09
commit
f68f6c0246
|
@ -308,8 +308,14 @@ struct ir3_instruction {
|
|||
static inline struct ir3_instruction *
|
||||
ir3_neighbor_first(struct ir3_instruction *instr)
|
||||
{
|
||||
while (instr->cp.left)
|
||||
int cnt = 0;
|
||||
while (instr->cp.left) {
|
||||
instr = instr->cp.left;
|
||||
if (++cnt > 0xffff) {
|
||||
debug_assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return instr;
|
||||
}
|
||||
|
||||
|
@ -322,6 +328,10 @@ static inline int ir3_neighbor_count(struct ir3_instruction *instr)
|
|||
while (instr->cp.right) {
|
||||
num++;
|
||||
instr = instr->cp.right;
|
||||
if (num > 0xffff) {
|
||||
debug_assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return num;
|
||||
|
|
Loading…
Reference in New Issue