diff options
author | Samuel Pitoiset <[email protected]> | 2019-07-31 09:39:18 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-07-31 12:14:29 +0200 |
commit | 29cca5f3817483813db3f8d25da5ecd49d2a015a (patch) | |
tree | 22d0687972797ed61ea6d4e1c1968c2e5099c2d6 | |
parent | fed6aa2fec31746b20f8c53789f6d2b78197fa4c (diff) |
radv: skip draw calls with 0-sized index buffers
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |