Mesa (main): radv: add a gfx10 bug workaround for NOT_EOP

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 6 13:33:15 UTC 2021


Module: Mesa
Branch: main
Commit: ba30adce07d71fcb3bdddfd7589cd3a0b86d50ea
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba30adce07d71fcb3bdddfd7589cd3a0b86d50ea

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Wed May 19 10:32:29 2021 -0400

radv: add a gfx10 bug workaround for NOT_EOP

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11532>

---

 src/amd/vulkan/radv_cmd_buffer.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index a5be4bde5df..466391a3a69 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -5448,6 +5448,18 @@ radv_emit_draw_packets_indexed(struct radv_cmd_buffer *cmd_buffer,
       }
    } else {
       if (vertexOffset) {
+         if (cmd_buffer->device->physical_device->rad_info.chip_class == GFX10) {
+            /* GFX10 has a bug that consecutive draw packets with NOT_EOP must not have
+             * count == 0 for the last draw that doesn't have NOT_EOP.
+             */
+            while (drawCount > 1) {
+               const VkMultiDrawIndexedInfoEXT *last = (const VkMultiDrawIndexedInfoEXT*)(((const uint8_t*)minfo) + (drawCount - 1) * stride);
+               if (last->indexCount)
+                  break;
+               drawCount--;
+            }
+         }
+
          radv_emit_userdata_vertex(cmd_buffer, info, *vertexOffset);
          vk_foreach_multi_draw_indexed(draw, i, minfo, drawCount, stride) {
             const uint32_t remaining_indexes = MAX2(state->max_index_count, draw->firstIndex) - draw->firstIndex;



More information about the mesa-commit mailing list