r600: don't set EOP on pop or loop end
authorDave Airlie <airlied@redhat.com>
Thu, 23 Nov 2017 04:05:05 +0000 (14:05 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 5 Dec 2017 20:09:33 +0000 (20:09 +0000)
This appears to bad, compute shaders hang without it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c

index 7768f503c0ccd1077c452db8156b1a4f164a61b6..7d1e444f4ffaae31577b44396de07dede4167288 100644 (file)
@@ -3839,7 +3839,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
                        last = r600_isa_cf(ctx.bc->cf_last->op);
 
                /* alu clause instructions don't have EOP bit, so add NOP */
-               if (!last || last->flags & CF_ALU)
+               if (!last || last->flags & CF_ALU || ctx.bc->cf_last->op == CF_OP_LOOP_END || ctx.bc->cf_last->op == CF_OP_POP)
                        r600_bytecode_add_cfinst(ctx.bc, CF_OP_NOP);
 
                ctx.bc->cf_last->end_of_program = 1;