aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c8
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);
}