[Mesa-dev] [PATCH 5/8] r600: add alu + cf nop to copy shader on r600

Dave Airlie airlied at gmail.com
Mon Nov 9 20:10:26 PST 2015


From: Dave Airlie <airlied at redhat.com>

SB suggests we do this for r600, so lets do it,
for the copy shader.

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

diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 6646a7e..0e7c0e8 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1608,6 +1608,16 @@ static int generate_gs_copy_shader(struct r600_context *rctx,
 		cshader->shader.ring_item_sizes[ring] = ocnt * 16;
 	}
 
+	/* bc adds nops - copy it */
+	if (ctx.bc->chip_class == R600) {
+		memset(&alu, 0, sizeof(struct r600_bytecode_alu));
+		alu.op = ALU_OP0_NOP;
+		alu.last = 1;
+		r600_bytecode_add_alu(ctx.bc, &alu);
+
+		r600_bytecode_add_cfinst(ctx.bc, CF_OP_NOP);
+	}
+
 	/* export vertex data */
 	/* XXX factor out common code with r600_shader_from_tgsi ? */
 	for (i = 0; i < ocnt; ++i) {
-- 
2.1.0



More information about the mesa-dev mailing list