On desktop, blit depth when not cleared.
Workaround for #1283, makes Jeanne d'Arc playable.
This commit is contained in:
parent
4d477f0076
commit
202842d690
1 changed files with 11 additions and 0 deletions
|
@ -863,6 +863,17 @@ void FramebufferManager::SetRenderFrameBuffer() {
|
|||
ClearBuffer();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef USING_GLES2
|
||||
if (gl_extensions.FBO_ARB && currentRenderVfb_ != NULL && MaskedEqual(currentRenderVfb_->z_address, vfb->z_address)) {
|
||||
// Let's only do this if not clearing.
|
||||
if (!gstate.isModeClear() || !gstate.isClearModeDepthMask()) {
|
||||
fbo_bind_for_read(currentRenderVfb_->fbo);
|
||||
glBlitFramebuffer(0, 0, currentRenderVfb_->renderWidth, currentRenderVfb_->renderHeight, 0, 0, vfb->renderWidth, vfb->renderHeight, GL_DEPTH_BUFFER_BIT, GL_NEAREST);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
currentRenderVfb_ = vfb;
|
||||
} else {
|
||||
vfb->last_frame_render = gpuStats.numFlips;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue