From: Dave Airlie Date: Tue, 24 Feb 2015 04:09:40 +0000 (+1000) Subject: r600: workaround empty geom shader. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f347225752b48f3dc5a59a6be71fe78616252a7;p=mesa.git r600: workaround empty geom shader. We need to emit at least one cut/emit in every geometry shader, the easiest workaround it to stick a single CUT at the top of each geom shader. Reviewed-by: Marek Olšák Cc: "10.6 11.0 11.1" Signed-off-by: Dave Airlie --- diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 6233753e716..9fe20b02861 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -2219,6 +2219,11 @@ static int r600_shader_from_tgsi(struct r600_context *rctx, if (ctx.type == TGSI_PROCESSOR_GEOMETRY) { struct r600_bytecode_alu alu; int r; + + /* GS thread with no output workaround - emit a cut at start of GS */ + if (ctx.bc->chip_class == R600) + r600_bytecode_add_cfinst(ctx.bc, CF_OP_CUT_VERTEX); + for (j = 0; j < 4; j++) { memset(&alu, 0, sizeof(struct r600_bytecode_alu)); alu.op = ALU_OP1_MOV;