pan/midgard: Always set .cont for derivatives in loops
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 29 Jul 2019 23:55:15 +0000 (16:55 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 30 Jul 2019 17:01:19 +0000 (10:01 -0700)
We need to keep the helper invocations alive.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/midgard_emit.c

index ce85dfc..1996e1b 100644 (file)
@@ -260,6 +260,13 @@ emit_binary_bundle(compiler_context *ctx,
 
                 if (mir_op_computes_derivatives(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;
                 } else {