panfrost/midgard: Don't try to inline constants on branches
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 21 Apr 2019 03:59:05 +0000 (03:59 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Wed, 24 Apr 2019 02:22:31 +0000 (02:22 +0000)
Along with a corresponding fix to the move elimination pass (not
included here yet -- I just have it disabled for now), this will fix
dEQP-GLES2.functional.shaders.loops.for_uniform_iterations.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/midgard/midgard_compile.c

index b51f1224cf105b3bf82e1472cf93996206f73e86..66c8deb4771f5801b77a01f99f9c29b040546ff3 100644 (file)
@@ -2842,6 +2842,9 @@ inline_alu_constants(compiler_context *ctx)
                 /* If there is already a constant here, we can do nothing */
                 if (alu->has_constants) continue;
 
+                /* It makes no sense to inline constants on a branch */
+                if (alu->compact_branch || alu->prepacked_branch) continue;
+
                 CONDITIONAL_ATTACH(src0);
 
                 if (!alu->has_constants) {