radv: allocate more space in the CS when emitting events
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 28 May 2019 10:58:05 +0000 (12:58 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 28 May 2019 14:56:17 +0000 (16:56 +0200)
If the driver waits for CP DMA to be idle and emit an EOP event
we need more space.

This fixes a crash with Quake Champions.

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 43730f0..0e9c189 100644 (file)
@@ -4782,7 +4782,7 @@ static void write_event(struct radv_cmd_buffer *cmd_buffer,
 
        radv_cs_add_buffer(cmd_buffer->device->ws, cs, event->bo);
 
-       MAYBE_UNUSED unsigned cdw_max = radeon_check_space(cmd_buffer->device->ws, cs, 18);
+       MAYBE_UNUSED unsigned cdw_max = radeon_check_space(cmd_buffer->device->ws, cs, 21);
 
        /* Flags that only require a top-of-pipe event. */
        VkPipelineStageFlags top_of_pipe_flags =