From: Dave Airlie <airl...@redhat.com>

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.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
 src/gallium/drivers/r600/r600_shader.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_shader.c 
b/src/gallium/drivers/r600/r600_shader.c
index fc6335a..6646a7e 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -2205,6 +2205,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;
-- 
2.1.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to