radv: add a gfx10 bug workaround for NOT_EOP

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11532>
This commit is contained in:
Mike Blumenkrantz 2021-05-19 10:32:29 -04:00 committed by Marge Bot
parent d9132fcb50
commit ba30adce07

View file

@ -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;