/* Ignore pDepthStencilState? */
if (info->pDepthStencilState) {
const bool has_static_attachment =
- subpass && subpass->has_depth_stencil_attachment;
+ subpass &&
+ (subpass->attachment_aspects &
+ (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT));
/* VUID-VkGraphicsPipelineCreateInfo-renderPass-06043 */
bool require_state =
/* Ignore pColorBlendState? */
if (info->pColorBlendState) {
const bool has_static_attachment =
- subpass && subpass->has_color_attachment;
+ subpass &&
+ (subpass->attachment_aspects & VK_IMAGE_ASPECT_COLOR_BIT);
/* VUID-VkGraphicsPipelineCreateInfo-renderPass-06044 */
bool require_state =
#include "venus-protocol/vn_protocol_driver_framebuffer.h"
#include "venus-protocol/vn_protocol_driver_render_pass.h"
+#include "vk_format.h"
#include "vn_device.h"
#include "vn_image.h"
for (uint32_t j = 0; j < subpass_desc->colorAttachmentCount; j++) { \
if (subpass_desc->pColorAttachments[j].attachment != \
VK_ATTACHMENT_UNUSED) { \
- subpass->has_color_attachment = true; \
+ subpass->attachment_aspects |= VK_IMAGE_ASPECT_COLOR_BIT; \
break; \
} \
} \
if (subpass_desc->pDepthStencilAttachment && \
subpass_desc->pDepthStencilAttachment->attachment != \
VK_ATTACHMENT_UNUSED) { \
- subpass->has_depth_stencil_attachment = true; \
+ uint32_t att = \
+ subpass_desc->pDepthStencilAttachment->attachment; \
+ subpass->attachment_aspects |= \
+ vk_format_aspects(_pCreateInfo->pAttachments[att].format); \
} \
} \
} while (false)
};
struct vn_subpass {
- bool has_color_attachment;
- bool has_depth_stencil_attachment;
+ VkImageAspectFlags attachment_aspects;
uint32_t view_mask;
};