Skip to content

Commit

Permalink
Only copy the depth buffer if the framebuffer size matches.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jan 5, 2014
1 parent 53e23d1 commit aaf219d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion GPU/GLES/Framebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,11 @@ void FramebufferManager::SetRenderFrameBuffer() {
#endif

#ifndef USING_GLES2
if (gl_extensions.FBO_ARB && currentRenderVfb_ != NULL && currentRenderVfb_->fbo != NULL && MaskedEqual(currentRenderVfb_->z_address, vfb->z_address)) {
if (gl_extensions.FBO_ARB && currentRenderVfb_ != NULL &&
currentRenderVfb_->fbo != NULL &&
MaskedEqual(currentRenderVfb_->z_address, vfb->z_address) &&
currentRenderVfb_->renderWidth == vfb->renderWidth &&
currentRenderVfb_->renderHeight == vfb->renderHeight) {
// Let's only do this if not clearing.
if (!gstate.isModeClear() || !gstate.isClearModeDepthMask()) {
fbo_bind_for_read(currentRenderVfb_->fbo);
Expand Down

1 comment on commit aaf219d

@solarmystic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hrydgard @unknownbrackets

This commit resolves the issue for FFVII CC mentioned earlier in ce8f98e#commitcomment-4986106 and still retains the original @unknownbrackets fix for Jeanne D'arc.

Thanks for the fix @hrydgard

Please sign in to comment.