From: Nicolai Hähnle Date: Sat, 7 May 2016 03:04:31 +0000 (-0500) Subject: radeonsi/sid: add packet definitions for IB chaining X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a7c26bfc0ce9d12def9f05a84c19f51f3d311aaa;p=mesa.git radeonsi/sid: add packet definitions for IB chaining While we're at it, add packet printing in si_debug. Reviewed-by: Marek Olšák --- 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