radv: add the draw count buffer to the list of buffers
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 13 Oct 2017 16:20:21 +0000 (18:20 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 14 Oct 2017 10:05:19 +0000 (12:05 +0200)
My guess is that the GPU is going to report VM faults if
vkCmdDrawIndirectCountAMD() (and friends) are used.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index 495fd67..4749516 100644 (file)
@@ -2992,6 +2992,8 @@ radv_emit_indirect_draw(struct radv_cmd_buffer *cmd_buffer,
        if (count_buffer) {
                count_va = radv_buffer_get_va(count_buffer->bo);
                count_va += count_offset + count_buffer->offset;
+
+               cmd_buffer->device->ws->cs_add_buffer(cs, count_buffer->bo, 8);
        }
 
        if (!draw_count)