diff options
author | Rob Clark <[email protected]> | 2020-05-06 10:01:08 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-13 03:28:40 +0000 |
commit | 25f4fb346e1fad34ce1f2e9e39b062a303db4ce3 (patch) | |
tree | f2a995d23d000fb9c17c6edd002231193d055480 /src/freedreno/ir3/ir3_postsched.c | |
parent | f351e1d137603213b5daacece5ff67ad0786d982 (diff) |
freedreno/ir3/postsched: reset sfu_delay on sync
Once we schedule an instruction that will require an `(ss)` sync flag,
there is no need to delay any further instructions that consume an
SFU result (until the next SFU instruction is scheduled).
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4923>
Diffstat (limited to 'src/freedreno/ir3/ir3_postsched.c')
-rw-r--r-- | src/freedreno/ir3/ir3_postsched.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/freedreno/ir3/ir3_postsched.c b/src/freedreno/ir3/ir3_postsched.c index 496c1d211b8..4535459efcf 100644 --- a/src/freedreno/ir3/ir3_postsched.c +++ b/src/freedreno/ir3/ir3_postsched.c @@ -94,6 +94,8 @@ schedule(struct ir3_postsched_ctx *ctx, struct ir3_instruction *instr) if (is_sfu(instr)) { ctx->sfu_delay = 8; + } else if (check_src_cond(instr, is_sfu)) { + ctx->sfu_delay = 0; } else if (ctx->sfu_delay > 0) { ctx->sfu_delay--; } @@ -129,10 +131,8 @@ static bool would_sync(struct ir3_postsched_ctx *ctx, struct ir3_instruction *instr) { if (ctx->sfu_delay) { - struct ir3_register *reg; - foreach_src (reg, instr) - if (reg->instr && is_sfu(reg->instr)) - return true; + if (check_src_cond(instr, is_sfu)) + return true; } return false; |