From 3c8df327f1f5c153a75002de12113a777160790d Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sun, 30 Oct 2022 16:18:50 +0000 Subject: [PATCH] Fixup subpass barriers and flags --- .../main/cpp/skyline/gpu/cache/graphics_pipeline_cache.cpp | 1 + app/src/main/cpp/skyline/gpu/interconnect/command_nodes.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/skyline/gpu/cache/graphics_pipeline_cache.cpp b/app/src/main/cpp/skyline/gpu/cache/graphics_pipeline_cache.cpp index 1add7a6f..7d6bd0ae 100644 --- a/app/src/main/cpp/skyline/gpu/cache/graphics_pipeline_cache.cpp +++ b/app/src/main/cpp/skyline/gpu/cache/graphics_pipeline_cache.cpp @@ -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(attachmentDescriptions.size() - 1), diff --git a/app/src/main/cpp/skyline/gpu/interconnect/command_nodes.cpp b/app/src/main/cpp/skyline/gpu/interconnect/command_nodes.cpp index d3b0ac5b..1313722e 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/command_nodes.cpp +++ b/app/src/main/cpp/skyline/gpu/interconnect/command_nodes.cpp @@ -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(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())