[Mesa-dev] [PATCH 14/18] radeonsi/sid: add packet definitions for IB chaining
Nicolai Hähnle
nhaehnle at gmail.com
Mon May 9 23:21:32 UTC 2016
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
While we're at it, add packet printing in si_debug.
---
src/gallium/drivers/radeonsi/si_debug.c | 7 +++++++
src/gallium/drivers/radeonsi/sid.h | 8 ++++++++
2 files changed, 15 insertions(+)
diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c
index 783dee4..346d85c 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 da4f4fa..50e1af0 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
--
2.7.4
More information about the mesa-dev
mailing list