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 <airlied@redhat.com>
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);
}