att->load_op = pCreateInfo->pAttachments[i].loadOp;
att->stencil_load_op = pCreateInfo->pAttachments[i].stencilLoadOp;
att->attachment = i;
-
- bool is_zs = util_format_is_depth_or_stencil(lvp_vk_format_to_pipe_format(att->format));
- pass->has_zs_attachment |= is_zs;
- pass->has_color_attachment |= !is_zs;
}
uint32_t subpass_attachment_idx = 0;
for (uint32_t j = 0; j < desc->colorAttachmentCount; j++) {
CHECK_UNUSED_ATTACHMENT(pColorAttachments, color_attachments, j);
+ subpass->has_color_attachment |= !!subpass->color_attachments[j];
}
}
subpass_attachment_idx++;
CHECK_UNUSED_ATTACHMENT(pDepthStencilAttachment, depth_stencil_attachment, 0);
+ subpass->has_zs_attachment = !!(*subpass->depth_stencil_attachment);
}
const VkSubpassDescriptionDepthStencilResolve *ds_resolve =
/* pDepthStencilState */
if (src->pDepthStencilState && !rasterization_disabled &&
- (pass ? pass->has_zs_attachment : (rp_info->depthAttachmentFormat || rp_info->stencilAttachmentFormat))) {
+ (pass ? pass->subpasses[src->subpass].has_zs_attachment : (rp_info->depthAttachmentFormat || rp_info->stencilAttachmentFormat))) {
LVP_PIPELINE_DUP(dst->pDepthStencilState,
src->pDepthStencilState,
VkPipelineDepthStencilStateCreateInfo,
/* pColorBlendState */
if (src->pColorBlendState && !rasterization_disabled &&
- (pass ? pass->has_color_attachment : rp_info->colorAttachmentCount)) {
+ (pass ? pass->subpasses[src->subpass].has_color_attachment : rp_info->colorAttachmentCount)) {
VkPipelineColorBlendStateCreateInfo* cb_state;
cb_state = ralloc(mem_ctx, VkPipelineColorBlendStateCreateInfo);
/** Subpass has at least one color resolve attachment */
bool has_color_resolve;
+ bool has_color_attachment;
+ bool has_zs_attachment;
uint32_t view_mask;
};
uint32_t subpass_count;
struct lvp_subpass_attachment * subpass_attachments;
struct lvp_render_pass_attachment * attachments;
- bool has_color_attachment;
- bool has_zs_attachment;
struct lvp_subpass subpasses[0];
};