Fix check for glBlitFramebufferNV

This commit is contained in:
Henrik Rydgard 2014-05-08 10:40:36 +02:00
parent 2b58f2657c
commit 2e56e0f122
2 changed files with 8 additions and 12 deletions

View file

@ -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.
}

2
native

@ -1 +1 @@
Subproject commit 0fe120906a369a8c10dda08f26a0d02c1d834ace
Subproject commit 996808254b76a2614c0d2506f4b707c0c880f1e9