diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-05-12 13:34:52 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-12 22:30:41 +0000 |
commit | 344dd914972f9ddcef814a3cf08f832708c33146 (patch) | |
tree | c4e91b667e3f42c8ec86120284fc0b21120bf08e /src | |
parent | 9a7f0e268b7baeb92d8d7d2989beb43550262406 (diff) |
pan/mdg: Use analysis to set .cont/.last flags
Corresponds roughly to what we analyze. Note that "terminate AND
execute" is a contradiction (rather: it's equivalent to just
terminating), hence why there are only three possibilities for the
states of the flags:
.cont = continue, don't execute
.last = don't continue, don't execute
.cont.last = continue and execute
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/midgard/midgard_emit.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/panfrost/midgard/midgard_emit.c b/src/panfrost/midgard/midgard_emit.c index 98844169fae..b62052b1317 100644 --- a/src/panfrost/midgard/midgard_emit.c +++ b/src/panfrost/midgard/midgard_emit.c @@ -508,16 +508,8 @@ emit_binary_bundle(compiler_context *ctx, ctx->texture_op_count--; if (mir_op_computes_derivatives(ctx->stage, ins->texture.op)) { - bool continues = ctx->texture_op_count > 0; - - /* Control flow complicates helper invocation - * lifespans, so for now just keep helper threads - * around indefinitely with loops. TODO: Proper - * analysis */ - continues |= ctx->loop_count > 0; - - ins->texture.cont = continues; - ins->texture.last = !continues; + ins->texture.cont = !ins->helper_terminate; + ins->texture.last = ins->helper_terminate || ins->helper_execute; } else { ins->texture.cont = ins->texture.last = 1; } |