mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
r600g: emit NOPs at end of shaders in more cases
If the shader has no CF clauses at all emit an nop If the last instruction is an ENDLOOP add a NOP for the LOOP to go to if the last instruction is CALL_FS add a NOP These fix a bunch of hangs in the geometry shader tests. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
c4782a58c3
commit
461c463bb2
1 changed files with 5 additions and 2 deletions
|
|
@ -1931,10 +1931,13 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
|
|||
if (ctx.bc->chip_class == CAYMAN)
|
||||
cm_bytecode_add_cf_end(ctx.bc);
|
||||
else {
|
||||
const struct cf_op_info *last = r600_isa_cf(ctx.bc->cf_last->op);
|
||||
const struct cf_op_info *last = NULL;
|
||||
|
||||
if (ctx.bc->cf_last)
|
||||
last = r600_isa_cf(ctx.bc->cf_last->op);
|
||||
|
||||
/* alu clause instructions don't have EOP bit, so add NOP */
|
||||
if (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_CALL_FS)
|
||||
r600_bytecode_add_cfinst(ctx.bc, CF_OP_NOP);
|
||||
|
||||
ctx.bc->cf_last->end_of_program = 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue