[Mesa-dev] [PATCH] r600: shader CF_OP_VTX also doesn't use the EOP bit.

Gert Wollny gw.fossdev at gmail.com
Tue Nov 14 18:50:00 UTC 2017


Although the EOP bit is documented for the vertex fetch clause, it is not
properly interpreted. As a result the piglit
  spec/arb_tessellation_shader/execution/trivial-tess-gs_no-gs-inputs
creates a TESS_EVAL shader that does not have an EOP clause, which might
result in a GPU lockup.

This patch forces an additional CF_OP_NOP group like it is already done for
other final CF_OP groups.

Signed-off-by: Gert Wollny <gw.fossdev at gmail.com>
---
 src/gallium/drivers/r600/r600_shader.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 0fa2a1f0d1..625537b48b 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -3720,7 +3720,9 @@ 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 || ctx.bc->cf_last->op == CF_OP_LOOP_END || ctx.bc->cf_last->op == CF_OP_CALL_FS || ctx.bc->cf_last->op == CF_OP_POP || ctx.bc->cf_last->op == CF_OP_GDS)
+		if (!last || last->flags & CF_ALU || ctx.bc->cf_last->op == CF_OP_LOOP_END ||
+		    ctx.bc->cf_last->op == CF_OP_CALL_FS || ctx.bc->cf_last->op == CF_OP_POP ||
+		    ctx.bc->cf_last->op == CF_OP_GDS || ctx.bc->cf_last->op == CF_OP_VTX)
 			r600_bytecode_add_cfinst(ctx.bc, CF_OP_NOP);
 
 		ctx.bc->cf_last->end_of_program = 1;
-- 
2.13.6



More information about the mesa-dev mailing list