[Mesa-dev] [PATCH 1/6] radv: skip draw calls with 0-sized index buffers
Samuel Pitoiset
samuel.pitoiset at gmail.com
Wed Jul 31 07:39:18 UTC 2019
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_cmd_buffer.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index e0ea47b5745..37026246aa9 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -4323,6 +4323,12 @@ radv_emit_draw_packets(struct radv_cmd_buffer *cmd_buffer,
int index_size = radv_get_vgt_index_size(state->index_type);
uint64_t index_va;
+ /* Skip draw calls with 0-sized index buffers. They
+ * cause a hang on some chips, like Navi10-14.
+ */
+ if (!cmd_buffer->state.max_index_count)
+ return;
+
index_va = state->index_va;
index_va += info->first_index * index_size;
--
2.22.0
More information about the mesa-dev
mailing list