Fixup subpass barriers and flags

This commit is contained in:
Billy Laws 2022-10-30 16:18:50 +00:00
parent 5ab80901c6
commit 3c8df327f1
2 changed files with 4 additions and 2 deletions

View File

@ -360,6 +360,7 @@ namespace skyline::gpu::cache {
.stencilStoreOp = vk::AttachmentStoreOp::eStore,
.initialLayout = view->texture->layout,
.finalLayout = view->texture->layout,
.flags = vk::AttachmentDescriptionFlagBits::eMayAlias
});
attachmentReferences.push_back(vk::AttachmentReference{
.attachment = static_cast<u32>(attachmentDescriptions.size() - 1),

View File

@ -40,6 +40,7 @@ namespace skyline::gpu::interconnect::node {
.format = *view->format,
.initialLayout = view->texture->layout,
.finalLayout = view->texture->layout,
.flags = vk::AttachmentDescriptionFlagBits::eMayAlias
});
return static_cast<u32>(attachments.size() - 1);
} else {
@ -104,8 +105,8 @@ namespace skyline::gpu::interconnect::node {
dependency.dstAccessMask = vk::AccessFlagBits::eColorAttachmentRead;
} else if (view->format->vkAspect & (vk::ImageAspectFlagBits::eDepth | vk::ImageAspectFlagBits::eStencil)) {
dependency.srcStageMask = vk::PipelineStageFlagBits::eEarlyFragmentTests | vk::PipelineStageFlagBits::eLateFragmentTests;
dependency.srcAccessMask = vk::AccessFlagBits::eDepthStencilAttachmentRead;
dependency.dstAccessMask = vk::AccessFlagBits::eDepthStencilAttachmentWrite;
dependency.srcAccessMask = vk::AccessFlagBits::eDepthStencilAttachmentWrite;
dependency.dstAccessMask = vk::AccessFlagBits::eDepthStencilAttachmentRead;
}
if (std::find(subpassDependencies.begin(), subpassDependencies.end(), dependency) == subpassDependencies.end())