diff --git a/src/gallium/drivers/r600/sfn/sfn_scheduler.cpp b/src/gallium/drivers/r600/sfn/sfn_scheduler.cpp index 5266a0147ff..f2022b9f7c6 100644 --- a/src/gallium/drivers/r600/sfn/sfn_scheduler.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_scheduler.cpp @@ -1125,9 +1125,9 @@ BlockScheduler::collect_ready_alu_vec(std::list& ready, } int max_check = 0; - while (i != e && max_check++ < 64) { - if (ready.size() < 64 && (*i)->ready()) { + while (i != e && max_check++ < 64 && ready.size() < 64) { + if ((*i)->ready()) { int priority = 0; /* LDS fetches that use static offsets are usually ready ery fast, * so that they would get schedules early, and this leaves the