summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorConnor McLaughlin <stenzek@gmail.com>2019-03-29 20:03:13 +1000
committerGitHub <noreply@github.com>2019-03-29 20:03:13 +1000
commit1304e963ad65df0e098e017cef665486d8cde45d (patch)
tree4615243c0488bf74429fe7b5ae5baa6ed30cefd0 /Source/Core
parent154eeae8ae1e7105bc06e76dc9ff09884190867e (diff)
parent8aa0ea10d950c3a4ec69dba239b701d652b894e2 (diff)
Merge pull request #7895 from stenzek/framebuffer-corruption
FramebufferManager: Don't discard in ReinterpretPixelData
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/FramebufferManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/FramebufferManager.cpp b/Source/Core/VideoCommon/FramebufferManager.cpp
index 1c92e36c94..864fbf144f 100644
--- a/Source/Core/VideoCommon/FramebufferManager.cpp
+++ b/Source/Core/VideoCommon/FramebufferManager.cpp
@@ -277,9 +277,12 @@ bool FramebufferManager::ReinterpretPixelData(EFBReinterpretType convtype)
return false;
// Draw to the secondary framebuffer.
+ // We don't discard here because discarding the framebuffer also throws away the depth
+ // buffer, which we want to preserve. If we find this to be hindering performance in the
+ // future (e.g. on mobile/tilers), it may be worth discarding only the color buffer.
m_efb_color_texture->FinishedRendering();
g_renderer->BeginUtilityDrawing();
- g_renderer->SetAndDiscardFramebuffer(m_efb_convert_framebuffer.get());
+ g_renderer->SetFramebuffer(m_efb_convert_framebuffer.get());
g_renderer->SetViewportAndScissor(m_efb_framebuffer->GetRect());
g_renderer->SetPipeline(m_format_conversion_pipelines[static_cast<u32>(convtype)].get());
g_renderer->SetTexture(0, m_efb_color_texture.get());