freedreno/ir3: insert nop between sfu/mem operations
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 4 Apr 2015 17:37:45 +0000 (13:37 -0400)
committerRob Clark <robclark@freedesktop.org>
Sun, 5 Apr 2015 20:36:35 +0000 (16:36 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/freedreno/ir3/ir3_sched.c

index 94237c33ff83347501d1493e26baa794d42aea0b..653f679fe1ef9f2ff98a9f95c76695fb1c6af5ee 100644 (file)
@@ -110,6 +110,11 @@ static struct ir3_instruction * prev(struct ir3_instruction *instr)
        return p;
 }
 
+static bool is_sfu_or_mem(struct ir3_instruction *instr)
+{
+       return is_sfu(instr) || is_mem(instr);
+}
+
 static void schedule(struct ir3_sched_ctx *ctx,
                struct ir3_instruction *instr, bool remove)
 {
@@ -119,7 +124,7 @@ static void schedule(struct ir3_sched_ctx *ctx,
         * a nop.. ideally we'd know about this constraint in the
         * scheduling and depth calculation..
         */
-       if (ctx->scheduled && is_sfu(ctx->scheduled) && is_sfu(instr))
+       if (ctx->scheduled && is_sfu_or_mem(ctx->scheduled) && is_sfu_or_mem(instr))
                schedule(ctx, ir3_instr_create(block, 0, OPC_NOP), false);
 
        /* remove from depth list: