[Mesa-dev] [PATCH 3/5] r600: add support for mark bit to the assembler.

Dave Airlie airlied at gmail.com
Tue Oct 31 23:32:51 UTC 2017


From: Dave Airlie <airlied at redhat.com>

This adds support to the assembler for the mark bit
 on the export word1.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/gallium/drivers/r600/eg_asm.c   | 2 ++
 src/gallium/drivers/r600/r600_asm.c | 4 ++++
 src/gallium/drivers/r600/r600_asm.h | 1 +
 3 files changed, 7 insertions(+)

diff --git a/src/gallium/drivers/r600/eg_asm.c b/src/gallium/drivers/r600/eg_asm.c
index 19915cf..be92751 100644
--- a/src/gallium/drivers/r600/eg_asm.c
+++ b/src/gallium/drivers/r600/eg_asm.c
@@ -89,6 +89,7 @@ int eg_bytecode_cf_build(struct r600_bytecode *bc, struct r600_bytecode_cf *cf)
 					S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(cf->output.swizzle_z) |
 					S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(cf->output.swizzle_w) |
 					S_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(cf->barrier) |
+					S_SQ_CF_ALLOC_EXPORT_WORD1_MARK(cf->mark) |
 					S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(opcode);
 
 			if (bc->chip_class == EVERGREEN) /* no EOP on cayman */
@@ -103,6 +104,7 @@ int eg_bytecode_cf_build(struct r600_bytecode *bc, struct r600_bytecode_cf *cf)
 					S_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR(cf->output.index_gpr);
 			bc->bytecode[id] = S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(cf->output.burst_count - 1) |
 					S_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(cf->barrier) |
+					S_SQ_CF_ALLOC_EXPORT_WORD1_MARK(cf->mark) |
 					S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(opcode) |
 					S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK(cf->output.comp_mask) |
 					S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE(cf->output.array_size);
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 60c9cec..a2c2ea7 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -2125,6 +2125,8 @@ void r600_bytecode_disasm(struct r600_bytecode *bc)
 				print_indent(o, 67);
 
 				fprintf(stderr, " ES:%X ", cf->output.elem_size);
+				if (cf->mark)
+					fprintf(stderr, "MARK ");
 				if (!cf->barrier)
 					fprintf(stderr, "NO_BARRIER ");
 				if (cf->end_of_program)
@@ -2165,6 +2167,8 @@ void r600_bytecode_disasm(struct r600_bytecode *bc)
 				fprintf(stderr, " ES:%i ", cf->output.elem_size);
 				if (cf->output.array_size != 0xFFF)
 					fprintf(stderr, "AS:%i ", cf->output.array_size);
+				if (cf->mark)
+					fprintf(stderr, "MARK ");
 				if (!cf->barrier)
 					fprintf(stderr, "NO_BARRIER ");
 				if (cf->end_of_program)
diff --git a/src/gallium/drivers/r600/r600_asm.h b/src/gallium/drivers/r600/r600_asm.h
index aa044c5..7a11d45 100644
--- a/src/gallium/drivers/r600/r600_asm.h
+++ b/src/gallium/drivers/r600/r600_asm.h
@@ -180,6 +180,7 @@ struct r600_bytecode_cf {
 	unsigned			eg_alu_extended;
 	unsigned			barrier;
 	unsigned			end_of_program;
+	unsigned                        mark;
 	unsigned                        vpm;
 	struct list_head		alu;
 	struct list_head		tex;
-- 
2.9.5



More information about the mesa-dev mailing list