freedreno/ir3: pass variant to postsched
[mesa.git] / src / freedreno / ir3 / ir3_postsched.c
index 109b96438a9d6f63384bef43cba15e92cab90ebc..ad16526cd507bcc2cb961435ad2b18dfb525bd47 100644 (file)
@@ -53,6 +53,8 @@
 struct ir3_postsched_ctx {
        struct ir3 *ir;
 
+       struct ir3_shader_variant *v;
+
        void *mem_ctx;
        struct ir3_block *block;           /* the current block */
        struct dag *dag;
@@ -536,7 +538,6 @@ sched_dag_init(struct ir3_postsched_ctx *ctx)
         */
        foreach_instr (instr, &ctx->unscheduled_list) {
                struct ir3_postsched_node *n = instr->data;
-               struct ir3_instruction *src;
 
                foreach_ssa_src_n (src, i, instr) {
                        if (src->block != instr->block)
@@ -582,6 +583,8 @@ static void
 sched_block(struct ir3_postsched_ctx *ctx, struct ir3_block *block)
 {
        ctx->block = block;
+       ctx->tex_delay = 0;
+       ctx->sfu_delay = 0;
 
        /* move all instructions to the unscheduled list, and
         * empty the block's instruction list (to which we will
@@ -700,10 +703,11 @@ cleanup_self_movs(struct ir3 *ir)
 }
 
 bool
-ir3_postsched(struct ir3 *ir)
+ir3_postsched(struct ir3 *ir, struct ir3_shader_variant *v)
 {
        struct ir3_postsched_ctx ctx = {
                        .ir = ir,
+                       .v  = v,
        };
 
        ir3_remove_nops(ir);