diff options
author | Lioncash <mathew1800@gmail.com> | 2020-12-05 10:51:14 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-12-05 12:39:35 +0100 |
commit | 414a87a4f4570344140d77a7985b4d118b754341 (patch) | |
tree | 6eac8e13f3333c89d8c0f3428b8664cab63a484a /src/video_core/renderer_vulkan/vk_rasterizer.cpp | |
parent | Merge pull request #5124 from lioncash/video-shadow (diff) | |
download | yuzu-414a87a4f4570344140d77a7985b4d118b754341.tar yuzu-414a87a4f4570344140d77a7985b4d118b754341.tar.gz yuzu-414a87a4f4570344140d77a7985b4d118b754341.tar.bz2 yuzu-414a87a4f4570344140d77a7985b4d118b754341.tar.lz yuzu-414a87a4f4570344140d77a7985b4d118b754341.tar.xz yuzu-414a87a4f4570344140d77a7985b4d118b754341.tar.zst yuzu-414a87a4f4570344140d77a7985b4d118b754341.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index e0fb8693f..560386081 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -904,15 +904,14 @@ void RasterizerVulkan::SetupShaderDescriptors( texture_cache.GuardSamplers(false); } -void RasterizerVulkan::SetupImageTransitions( - Texceptions texceptions, const std::array<View, Maxwell::NumRenderTargets>& color_attachments, - const View& zeta_attachment) { +void RasterizerVulkan::SetupImageTransitions(Texceptions texceptions, const ColorAttachments& color, + const ZetaAttachment& zeta) { TransitionImages(sampled_views, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VK_ACCESS_SHADER_READ_BIT); TransitionImages(image_views, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT); - for (std::size_t rt = 0; rt < std::size(color_attachments); ++rt) { - const auto color_attachment = color_attachments[rt]; + for (std::size_t rt = 0; rt < color.size(); ++rt) { + const auto color_attachment = color[rt]; if (color_attachment == nullptr) { continue; } @@ -923,13 +922,13 @@ void RasterizerVulkan::SetupImageTransitions( VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT); } - if (zeta_attachment != nullptr) { + if (zeta != nullptr) { const auto image_layout = texceptions[ZETA_TEXCEPTION_INDEX] ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; - zeta_attachment->Transition(image_layout, VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, - VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | - VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT); + zeta->Transition(image_layout, VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, + VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | + VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT); } } |