[Mesa-dev] [PATCH] radv: re-emit VGT_INDEX_TYPE because non-indexed draws overwrite it
Samuel Pitoiset
samuel.pitoiset at gmail.com
Wed Oct 18 20:15:37 UTC 2017
Only on CIK and later. We should only update VGT_INDEX_TYPE but
it seems easier to re-emit all the index buffer packets.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_cmd_buffer.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index ae2f28f5fd..02eef2e4c1 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -1777,6 +1777,14 @@ radv_cmd_buffer_flush_state(struct radv_cmd_buffer *cmd_buffer,
cmd_buffer->state.last_ia_multi_vgt_param = ia_multi_vgt_param;
}
+ /* On CI and later, non-indexed draws overwrite VGT_INDEX_TYPE, so the
+ * state must be re-emitted before the next indexed draw.
+ */
+ if (!indexed_draw &&
+ cmd_buffer->device->physical_device->rad_info.chip_class >= CIK) {
+ cmd_buffer->state.dirty |= RADV_CMD_DIRTY_INDEX_BUFFER;
+ }
+
radv_cmd_buffer_flush_dynamic_state(cmd_buffer);
radv_emit_primitive_reset_state(cmd_buffer, indexed_draw);
--
2.14.2
More information about the mesa-dev
mailing list