diff options
author | Bas Nieuwenhuizen <[email protected]> | 2019-08-10 15:04:30 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2019-08-12 17:19:24 +0200 |
commit | e040c1b2749655e716dd21b035f003b041d8d3d1 (patch) | |
tree | a20bf41cf5241cb0214342d780af2455e2a934b6 | |
parent | 14c96a630037bba38c095910e67d4cf9a4baf166 (diff) |
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 <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 8 |
1 files 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); } |