summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-05-06 22:04:31 -0500
committerNicolai Hähnle <[email protected]>2016-06-01 22:52:19 +0200
commita7c26bfc0ce9d12def9f05a84c19f51f3d311aaa (patch)
tree87d2b4ac1a97c548b79b970e0c013e29499ddf28 /src/gallium/drivers/radeonsi
parent83a01cb4983fd4b8ee8402a0679bead2bc0094af (diff)
radeonsi/sid: add packet definitions for IB chaining
While we're at it, add packet printing in si_debug. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_debug.c7
-rw-r--r--src/gallium/drivers/radeonsi/sid.h8
2 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c
index 5783056a049..b551c725752 100644
--- a/src/gallium/drivers/radeonsi/si_debug.c
+++ b/src/gallium/drivers/radeonsi/si_debug.c
@@ -356,6 +356,13 @@ static uint32_t *si_parse_packet3(FILE *f, uint32_t *ib, int *num_dw,
si_dump_reg(f, R_504_DST_ADDR_HI, ib[5], ~0);
si_dump_reg(f, R_414_COMMAND, ib[6], ~0);
break;
+ case PKT3_INDIRECT_BUFFER_SI:
+ case PKT3_INDIRECT_BUFFER_CONST:
+ case PKT3_INDIRECT_BUFFER_CIK:
+ si_dump_reg(f, R_3F0_IB_BASE_LO, ib[1], ~0);
+ si_dump_reg(f, R_3F1_IB_BASE_HI, ib[2], ~0);
+ si_dump_reg(f, R_3F2_CONTROL, ib[3], ~0);
+ break;
case PKT3_NOP:
if (ib[0] == 0xffff1000) {
count = -1; /* One dword NOP. */
diff --git a/src/gallium/drivers/radeonsi/sid.h b/src/gallium/drivers/radeonsi/sid.h
index 25f8cf5cee4..1b466aae574 100644
--- a/src/gallium/drivers/radeonsi/sid.h
+++ b/src/gallium/drivers/radeonsi/sid.h
@@ -98,6 +98,7 @@
#define PKT3_NUM_INSTANCES 0x2F
#define PKT3_DRAW_INDEX_MULTI_AUTO 0x30
#define PKT3_INDIRECT_BUFFER_SI 0x32 /* not on CIK */
+#define PKT3_INDIRECT_BUFFER_CONST 0x33
#define PKT3_STRMOUT_BUFFER_UPDATE 0x34
#define PKT3_DRAW_INDEX_OFFSET_2 0x35
#define PKT3_DRAW_PREAMBLE 0x36 /* new on CIK, required on GFX7.2 and later */
@@ -126,6 +127,13 @@
#define WAIT_REG_MEM_EQUAL 3
#define PKT3_MEM_WRITE 0x3D /* not on CIK */
#define PKT3_INDIRECT_BUFFER_CIK 0x3F /* new on CIK */
+#define R_3F0_IB_BASE_LO 0x3F0
+#define R_3F1_IB_BASE_HI 0x3F1
+#define R_3F2_CONTROL 0x3F2
+#define S_3F2_IB_SIZE(x) (((unsigned)(x) & 0xfffff) << 0)
+#define S_3F2_CHAIN(x) (((unsigned)(x) & 0x1) << 20)
+#define S_3F2_VALID(x) (((unsigned)(x) & 0x1) << 23)
+
#define PKT3_COPY_DATA 0x40
#define COPY_DATA_SRC_SEL(x) ((x) & 0xf)
#define COPY_DATA_REG 0