freedreno/a2xx: ir2: update register state in scalar insert
authorJonathan Marek <jonathan@marek.ca>
Thu, 5 Sep 2019 15:25:07 +0000 (11:25 -0400)
committerJonathan Marek <jonathan@marek.ca>
Fri, 6 Sep 2019 02:24:29 +0000 (02:24 +0000)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robdclark@chromium.org>
src/gallium/drivers/freedreno/a2xx/ir2.c

index 89ac21a81e1aed27b3ec07063c7811e67bc835ce..2d542485c8023685c0bdcece389d7639df108d69 100644 (file)
@@ -133,6 +133,12 @@ insert(struct ir2_context *ctx, unsigned block_idx, unsigned reg_idx,
                sched = s;
        }
        *comp = ffs(mask) - 1;
+
+       if (sched) {
+               for (s = sched; s != &ctx->instr_sched[ctx->instr_sched_count]; s++)
+                       s->reg_state[reg_idx/8] |= 1 << (*comp+reg_idx%8*4);
+       }
+
        return sched;
 }