freedreno/ir3/deps: report progress

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048>
This commit is contained in:
Rob Clark 2020-05-14 15:43:31 -07:00 committed by Marge Bot
parent e4ecfde2dd
commit 721147a05d
2 changed files with 12 additions and 13 deletions

View File

@ -1204,7 +1204,7 @@ bool ir3_cp(struct ir3 *ir, struct ir3_shader_variant *so);
void ir3_group(struct ir3 *ir);
/* scheduling: */
void ir3_sched_add_deps(struct ir3 *ir);
bool ir3_sched_add_deps(struct ir3 *ir);
int ir3_sched(struct ir3 *ir);
struct ir3_context;

View File

@ -1202,20 +1202,19 @@ add_barrier_deps(struct ir3_block *block, struct ir3_instruction *instr)
* (2) reads that come before a write actually get scheduled before the
* write
*/
static void
calculate_deps(struct ir3_block *block)
{
foreach_instr (instr, &block->instr_list) {
if (instr->barrier_class) {
add_barrier_deps(block, instr);
}
}
}
void
bool
ir3_sched_add_deps(struct ir3 *ir)
{
bool progress = false;
foreach_block (block, &ir->block_list) {
calculate_deps(block);
foreach_instr (instr, &block->instr_list) {
if (instr->barrier_class) {
add_barrier_deps(block, instr);
progress = true;
}
}
}
return progress;
}