From 59e86b779424b13c2979c29b9043a66dd7bad777 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Thu, 26 Feb 2015 18:00:40 +0600 Subject: [PATCH] Fix DepthBufferToRDRAM::CopyToRDRAM when multisampling is on. --- FrameBuffer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index 51453a97..b5fa8e56 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -865,7 +865,12 @@ bool DepthBufferToRDRAM::CopyToRDRAM( u32 _address) { m_lastDList = RSP.DList; DepthBuffer * pDepthBuffer = pBuffer->m_pDepthBuffer; const u32 address = pDepthBuffer->m_address; - glBindFramebuffer(GL_READ_FRAMEBUFFER, pBuffer->m_FBO); + if (config.video.multisampling == 0) + glBindFramebuffer(GL_READ_FRAMEBUFFER, pBuffer->m_FBO); + else { + pDepthBuffer->resolveDepthBufferTexture(pBuffer); + glBindFramebuffer(GL_READ_FRAMEBUFFER, pBuffer->m_resolveFBO); + } glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_FBO); glDisable(GL_SCISSOR_TEST); glBlitFramebuffer(