radv: allocate enough space in cmdbuf when starting a subpass
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 5 Mar 2019 09:45:00 +0000 (10:45 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 5 Mar 2019 14:00:10 +0000 (15:00 +0100)
This fixes some CTS crashes with:
dEQP-VK.renderpass2.suballocation.attachment_write_mask.attachment_count_8.start_index_*

Ideally, we should check cmd_buffer->cs->max_dw because there is
likely enough space (the internal clear draws allocate space), but
keep that way for consistency.

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

index ad0b934ddfc6cbb00883f7c9779b03e63884fee1..3e652018499e8d1a2c9249c6a03f8a4833882dfe 100644 (file)
@@ -3446,7 +3446,7 @@ radv_cmd_buffer_begin_subpass(struct radv_cmd_buffer *cmd_buffer,
        struct radv_subpass *subpass = &state->pass->subpasses[subpass_id];
 
        MAYBE_UNUSED unsigned cdw_max = radeon_check_space(cmd_buffer->device->ws,
-                                                          cmd_buffer->cs, 2048);
+                                                          cmd_buffer->cs, 4096);
 
        radv_subpass_barrier(cmd_buffer, &subpass->start_barrier);