Mesa (master): radv: Skip 0-sized index buffers only when necessary
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Mar 22 10:57:41 UTC 2021
Module: Mesa
Branch: master
Commit: 2fb71504f002f39247c0c8157fc14102b9eee1b0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2fb71504f002f39247c0c8157fc14102b9eee1b0
Author: Tony Wasserka <tony.wasserka at gmx.de>
Date: Thu Mar 4 12:10:58 2021 +0100
radv: Skip 0-sized index buffers only when necessary
This workaround is only needed on Navi10 and Navi14.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9429>
---
src/amd/vulkan/radv_cmd_buffer.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index debb89c0f91..5122c0642fc 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -5426,10 +5426,9 @@ radv_emit_draw_packets(struct radv_cmd_buffer *cmd_buffer,
uint32_t remaining_indexes = cmd_buffer->state.max_index_count;
remaining_indexes = MAX2(remaining_indexes, info->first_index) - info->first_index;
- /* Skip draw calls with 0-sized index buffers. They
- * cause a hang on some chips, like Navi10-14.
- */
- if (!remaining_indexes)
+ /* Skip draw calls with 0-sized index buffers if the GPU can't handle them */
+ if (!remaining_indexes &&
+ cmd_buffer->device->physical_device->rad_info.has_zero_index_buffer_bug)
return;
index_va = state->index_va;
More information about the mesa-commit
mailing list