Merge branch 'patch-40' of github.com:raven02/ppsspp into raven02-patch-40

This commit is contained in:
Henrik Rydgard committed 2014-05-08 10:00:00 +02:00
commit 2b58f2657c
1 file changed
+12 -1
+12 -1
View File
@@ -954,7 +954,7 @@ void FramebufferManager::BindFramebufferDepth(VirtualFramebuffer *sourceframebuf
#ifndef USING_GLES2
if (gl_extensions.FBO_ARB) {
#else
if (gl_extensions.GLES3) {
if (gl_extensions.GLES3 || gl_extensions.NV_framebuffer_blit) {
#endif
#ifdef MAY_HAVE_GLES3
@@ -964,6 +964,17 @@ void FramebufferManager::BindFramebufferDepth(VirtualFramebuffer *sourceframebuf
glBlitFramebuffer(0, 0, sourceframebuffer->renderWidth, sourceframebuffer->renderHeight, 0, 0, targetframebuffer->renderWidth, targetframebuffer->renderHeight, GL_DEPTH_BUFFER_BIT, GL_NEAREST);
// If we set targetframebuffer->depthUpdated here, our optimization above would be pointless.
}
#else
// Let's only do this if not clearing.
if (!gstate.isModeClear() || !gstate.isClearModeDepthMask()) {
fbo_bind_for_read(sourceframebuffer->fbo);
// Use the built-in high performance blit function
// http://www.khronos.org/registry/gles/extensions/NV/NV_framebuffer_blit.txt
#ifndef __SYMBIAN32__
glBlitFramebufferNV(0, 0, sourceframebuffer->renderWidth, sourceframebuffer->renderHeight, 0, 0, targetframebuffer->renderWidth, targetframebuffer->renderHeight, GL_DEPTH_BUFFER_BIT, GL_NEAREST);
#endif
// If we set targetframebuffer->depthUpdated here, our optimization above would be pointless.
}
#endif
}
}