summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-04-04 13:37:45 -0400
committerRob Clark <[email protected]>2015-04-05 16:36:35 -0400
commitc7811f56c205b113dd820034a99ff3aaa20af636 (patch)
treed5d2beeb88fe0589940c224e2f3797cfc0479e3d /src/gallium/drivers/freedreno
parent14dfd8cc4344a1bb15a63179b497d14eaec9cc0d (diff)
freedreno/ir3: insert nop between sfu/mem operations
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_sched.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_sched.c b/src/gallium/drivers/freedreno/ir3/ir3_sched.c
index 94237c33ff8..653f679fe1e 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_sched.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_sched.c
@@ -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: