diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-03-26 10:10:33 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-31 01:12:26 +0000 |
commit | 683cd9b6f4f8c7c9531b39c5c5ef6f21a5396ea5 (patch) | |
tree | 0c7770ef57a4a2c76cea735ac4d8be26679bb4d1 /src | |
parent | f3726a08743a100c7e163489800fd0560da015b9 (diff) |
pan/bi: Fix off-by-one in scoreboarding packing
Clauses actually encode the *next* clauses' dependencies.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/bifrost/bi_pack.c | 2 | ||||
-rw-r--r-- | src/panfrost/bifrost/bi_schedule.c | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c index aab59f724d0..9e83a56e1e7 100644 --- a/src/panfrost/bifrost/bi_pack.c +++ b/src/panfrost/bifrost/bi_pack.c @@ -43,7 +43,7 @@ bi_pack_header(bi_clause *clause, bi_clause *next, bool is_fragment) .branch_cond = clause->branch_conditional, .datareg_writebarrier = clause->data_register_write_barrier, .datareg = clause->data_register, - .scoreboard_deps = clause->dependencies, + .scoreboard_deps = next ? next->dependencies : 0, .scoreboard_index = clause->scoreboard_id, .clause_type = clause->clause_type, .next_clause_type = next ? next->clause_type : 0, diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c index 589c84897ac..f112553c05a 100644 --- a/src/panfrost/bifrost/bi_schedule.c +++ b/src/panfrost/bifrost/bi_schedule.c @@ -104,17 +104,16 @@ bi_schedule(bi_context *ctx) if (is_first) is_first = false; - else + else { + /* Rule: first instructions cannot have write barriers */ u->dependencies |= (1 << last_id); + u->data_register_write_barrier = true; + } ids = ids & 1; last_id = u->scoreboard_id; u->back_to_back = true; - /* Rule: first instructions cannot have write barriers */ - if (!is_first) - u->data_register_write_barrier = true; - u->constant_count = 1; u->constants[0] = ins->constant.u64; |