diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 1abbbbe3ca..f77551a6ac 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -961,17 +961,13 @@ void FramebufferManager::BindFramebufferDepth(VirtualFramebuffer *sourceframebuf // Let's only do this if not clearing. if (!gstate.isModeClear() || !gstate.isClearModeDepthMask()) { fbo_bind_for_read(sourceframebuffer->fbo); - 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); + if (gl_extensions.GLES3) { + glBlitFramebuffer(0, 0, sourceframebuffer->renderWidth, sourceframebuffer->renderHeight, 0, 0, targetframebuffer->renderWidth, targetframebuffer->renderHeight, GL_DEPTH_BUFFER_BIT, GL_NEAREST); + } +#if defined(ANDROID) // We only support this extension on Android, it's not even available on PC. + else if (gl_extensions.NV_framebuffer_blit) { + 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. } diff --git a/native b/native index 0fe120906a..996808254b 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 0fe120906a369a8c10dda08f26a0d02c1d834ace +Subproject commit 996808254b76a2614c0d2506f4b707c0c880f1e9