summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-02-24 14:09:40 +1000
committerEmil Velikov <[email protected]>2015-12-03 18:43:12 +0000
commit5474b52bba196af38f3eaacfce69285e7d768dad (patch)
tree9ee789c39ec87381be7acf660ad187762ffd9a89
parent8b8cfadf84c0c4939469ca6451c6ae467da5d094 (diff)
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 <[email protected]> Cc: "10.6 11.0 11.1" <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit 4f347225752b48f3dc5a59a6be71fe78616252a7) [Emil Velikov: squash trivial conflict] Signed-off-by: Emil Velikov <[email protected]> Conflicts: src/gallium/drivers/r600/r600_shader.c
-rw-r--r--src/gallium/drivers/r600/r600_shader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 819f9a7986e..b16900bc698 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -2159,6 +2159,10 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
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);
+
memset(&alu, 0, sizeof(struct r600_bytecode_alu));
alu.op = ALU_OP1_MOV;
alu.src[0].sel = V_SQ_ALU_SRC_LITERAL;