From e040c1b2749655e716dd21b035f003b041d8d3d1 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sat, 10 Aug 2019 15:04:30 +0200 Subject: [PATCH] radv: Do not setup attachments without a framebuffer. Test that found this: dEQP-VK.geometry.layered.1d_array.secondary_cmd_buffer Fixes: 49e6c2fb78c "radv: Store color/depth surface info in attachment info instead of framebuffer." Reviewed-by: Dave Airlie --- src/amd/vulkan/radv_cmd_buffer.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 55b7a0a5055..187e8c5c252 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -3207,9 +3207,11 @@ VkResult radv_BeginCommandBuffer( struct radv_subpass *subpass = &cmd_buffer->state.pass->subpasses[pBeginInfo->pInheritanceInfo->subpass]; - result = radv_cmd_state_setup_attachments(cmd_buffer, cmd_buffer->state.pass, NULL); - if (result != VK_SUCCESS) - return result; + if (cmd_buffer->state.framebuffer) { + result = radv_cmd_state_setup_attachments(cmd_buffer, cmd_buffer->state.pass, NULL); + if (result != VK_SUCCESS) + return result; + } radv_cmd_buffer_set_subpass(cmd_buffer, subpass); } -- 2.30.2