mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix check for glBlitFramebufferNV
This commit is contained in:
parent
2b58f2657c
commit
2e56e0f122
2 changed files with 8 additions and 12 deletions
|
@ -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
2
native
|
@ -1 +1 @@
|
|||
Subproject commit 0fe120906a369a8c10dda08f26a0d02c1d834ace
|
||||
Subproject commit 996808254b76a2614c0d2506f4b707c0c880f1e9
|
Loading…
Add table
Reference in a new issue