summaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-04-26 19:53:02 -0300
committerGravatar ReinUsesLisp2020-04-26 19:53:02 -0300
commit8da16cf9fb6c2133faed1164a8573992e84a4297 (patch)
treea0d14c5ec0955d35cbc22b1670eadcdbdbe5ba31 /src/video_core/renderer_vulkan
parentMerge pull request #3795 from vitor-k/fix-folder (diff)
downloadyuzu-8da16cf9fb6c2133faed1164a8573992e84a4297.tar.gz
yuzu-8da16cf9fb6c2133faed1164a8573992e84a4297.tar.xz
yuzu-8da16cf9fb6c2133faed1164a8573992e84a4297.zip
texture_cache: Reintroduce preserve_contents accurately
This reverts commit 94b0e2e5dae4e0bd0021ac2d8fe1ff904a93ee69. preserve_contents proved to be a meaningful optimization. This commit reintroduces it but properly implemented on OpenGL. We have to make sure the clear removes all the previous contents of the image. It's not currently implemented on Vulkan because we can do smart things there that's preferred to be introduced in a separate commit.
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
index 68464e637..51c3b0f77 100644
--- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp
+++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
@@ -652,7 +652,7 @@ RasterizerVulkan::Texceptions RasterizerVulkan::UpdateAttachments() {
652 Texceptions texceptions; 652 Texceptions texceptions;
653 for (std::size_t rt = 0; rt < Maxwell::NumRenderTargets; ++rt) { 653 for (std::size_t rt = 0; rt < Maxwell::NumRenderTargets; ++rt) {
654 if (update_rendertargets) { 654 if (update_rendertargets) {
655 color_attachments[rt] = texture_cache.GetColorBufferSurface(rt); 655 color_attachments[rt] = texture_cache.GetColorBufferSurface(rt, true);
656 } 656 }
657 if (color_attachments[rt] && WalkAttachmentOverlaps(*color_attachments[rt])) { 657 if (color_attachments[rt] && WalkAttachmentOverlaps(*color_attachments[rt])) {
658 texceptions[rt] = true; 658 texceptions[rt] = true;
@@ -660,7 +660,7 @@ RasterizerVulkan::Texceptions RasterizerVulkan::UpdateAttachments() {
660 } 660 }
661 661
662 if (update_rendertargets) { 662 if (update_rendertargets) {
663 zeta_attachment = texture_cache.GetDepthBufferSurface(); 663 zeta_attachment = texture_cache.GetDepthBufferSurface(true);
664 } 664 }
665 if (zeta_attachment && WalkAttachmentOverlaps(*zeta_attachment)) { 665 if (zeta_attachment && WalkAttachmentOverlaps(*zeta_attachment)) {
666 texceptions[ZETA_TEXCEPTION_INDEX] = true; 666 texceptions[ZETA_TEXCEPTION_INDEX] = true;