radeonsi/sid: add packet definitions for IB chaining
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Sat, 7 May 2016 03:04:31 +0000 (22:04 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 1 Jun 2016 20:52:19 +0000 (22:52 +0200)
While we're at it, add packet printing in si_debug.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_debug.c
src/gallium/drivers/radeonsi/sid.h

index 5783056a04919e578db1430d7e1926f5372ca27c..b551c725752eed53fe143dfeccaa1afc00dca4a0 100644 (file)
@@ -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. */
index 25f8cf5cee4bd9c265f40b498268a988e13ed429..1b466aae574498185a17b6ffebd28fd84cb135bd 100644 (file)
@@ -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 */
 #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