From 29cca5f3817483813db3f8d25da5ecd49d2a015a Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 31 Jul 2019 09:39:18 +0200 Subject: radv: skip draw calls with 0-sized index buffers Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_cmd_buffer.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/amd') diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index a833fc4221b..bd5d30ad7a2 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; -- cgit v1.2.3