diff options
author | Jonathan Marek <[email protected]> | 2019-12-18 22:19:15 -0500 |
---|---|---|
committer | Jonathan Marek <[email protected]> | 2019-12-19 15:13:40 -0500 |
commit | 5c17d9b9ca57269bae5376c64b83432af21ae522 (patch) | |
tree | 94d031301ea4b950f79173dbb5f8a5f45efeb066 | |
parent | 83ad2e50843bb538bb5466cf68013895d7b0a37c (diff) |
freedreno/registers: document vertex/instance id offset bits
Signed-off-by: Jonathan Marek <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3162>
-rw-r--r-- | src/freedreno/registers/a6xx.xml | 7 | ||||
-rw-r--r-- | src/freedreno/vulkan/tu_cmd_buffer.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_emit.c | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/freedreno/registers/a6xx.xml b/src/freedreno/registers/a6xx.xml index ff723941f31..f75d98ad3a0 100644 --- a/src/freedreno/registers/a6xx.xml +++ b/src/freedreno/registers/a6xx.xml @@ -2707,7 +2707,12 @@ to upconvert to 32b float internally? <!-- always 0x0 ? --> <reg32 offset="0xa008" name="VFD_UNKNOWN_A008"/> - <reg32 offset="0xa009" name="VFD_UNKNOWN_A009"/> + <reg32 offset="0xa009" name="VFD_ADD_OFFSET"> + <!-- add VFD_INDEX_OFFSET to REGID4VTX --> + <bitfield name="VERTEX" pos="0" type="boolean"/> + <!-- add VFD_INSTANCE_START_OFFSET to REGID4INST --> + <bitfield name="INSTANCE" pos="1" type="boolean"/> + </reg32> <reg32 offset="0xa00e" name="VFD_INDEX_OFFSET"/> <reg32 offset="0xa00f" name="VFD_INSTANCE_START_OFFSET"/> diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index 0080e10ee66..729a0bc67a7 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -971,7 +971,7 @@ tu6_init_hw(struct tu_cmd_buffer *cmd, struct tu_cs *cs) tu_cs_emit_write_reg(cs, REG_A6XX_UCHE_CLIENT_PF, 4); tu_cs_emit_write_reg(cs, REG_A6XX_RB_UNKNOWN_8E01, 0x0); tu_cs_emit_write_reg(cs, REG_A6XX_SP_UNKNOWN_AB00, 0x5); - tu_cs_emit_write_reg(cs, REG_A6XX_VFD_UNKNOWN_A009, 0x00000001); + tu_cs_emit_write_reg(cs, REG_A6XX_VFD_ADD_OFFSET, A6XX_VFD_ADD_OFFSET_VERTEX); tu_cs_emit_write_reg(cs, REG_A6XX_RB_UNKNOWN_8811, 0x00000010); tu_cs_emit_write_reg(cs, REG_A6XX_PC_MODE_CNTL, 0x1f); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c index d323ae49942..229a863fd36 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c @@ -1320,7 +1320,7 @@ fd6_emit_restore(struct fd_batch *batch, struct fd_ringbuffer *ring) WRITE(REG_A6XX_UCHE_CLIENT_PF, 4); WRITE(REG_A6XX_RB_UNKNOWN_8E01, 0x1); WRITE(REG_A6XX_SP_UNKNOWN_AB00, 0x5); - WRITE(REG_A6XX_VFD_UNKNOWN_A009, 0x00000001); + WRITE(REG_A6XX_VFD_ADD_OFFSET, A6XX_VFD_ADD_OFFSET_VERTEX); WRITE(REG_A6XX_RB_UNKNOWN_8811, 0x00000010); WRITE(REG_A6XX_PC_MODE_CNTL, 0x1f); |