VkDevice device,
VkFormat srcFormat,
VkFormat dstFormat,
- deUint32 sampleCount)
+ deUint32 sampleCount,
+ RenderPassType renderPassType)
{
const VkSampleCountFlagBits samples (sampleCountBitFromomSampleCount(sampleCount));
const deUint32 splitSubpassCount (deDivRoundUp32(sampleCount, MAX_COLOR_ATTACHMENT_COUNT));
DE_NULL, // || const void* pNext;
0u, // deUint32 attachment; || deUint32 attachment;
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, // VkImageLayout layout; || VkImageLayout layout;
- 0u // || VkImageAspectFlags aspectMask;
+ (renderPassType == RENDERPASS_TYPE_RENDERPASS2) // || VkImageAspectFlags aspectMask;
+ ? getImageAspectFlags(srcFormat)
+ : 0u
);
{
switch (renderPassType)
{
case RENDERPASS_TYPE_LEGACY:
- return createRenderPass<AttachmentDescription1, AttachmentReference1, SubpassDescription1, SubpassDependency1, RenderPassCreateInfo1>(vkd, device, srcFormat, dstFormat, sampleCount);
+ return createRenderPass<AttachmentDescription1, AttachmentReference1, SubpassDescription1, SubpassDependency1, RenderPassCreateInfo1>(vkd, device, srcFormat, dstFormat, sampleCount, renderPassType);
case RENDERPASS_TYPE_RENDERPASS2:
- return createRenderPass<AttachmentDescription2, AttachmentReference2, SubpassDescription2, SubpassDependency2, RenderPassCreateInfo2>(vkd, device, srcFormat, dstFormat, sampleCount);
+ return createRenderPass<AttachmentDescription2, AttachmentReference2, SubpassDescription2, SubpassDependency2, RenderPassCreateInfo2>(vkd, device, srcFormat, dstFormat, sampleCount, renderPassType);
default:
TCU_THROW(InternalError, "Impossible");
}