summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2019-03-16 23:40:07 +1000
committerStenzek <stenzek@gmail.com>2019-03-16 23:45:08 +1000
commit8aa0ea10d950c3a4ec69dba239b701d652b894e2 (patch)
tree8f415e25231a82093ba6e4d2e589816acdc96dc3 /Source/Core/VideoCommon
parent861fc42fc92258b71d2c3067dd97f4371f895175 (diff)
FramebufferManager: Don't discard in ReinterpretPixelData
This was causing the depth buffer to be discarded as well, which has an effect on mobiles (doesn't get loaded into tile memory). If we find this is hindering performance (remember, the EFB is only a 640x528 texture), it may be worth changing the interface to support discarding only the colour buffer.
Diffstat (limited to 'Source/Core/VideoCommon')
-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 c3c41af2c7..5693546dba 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());