Skip to content

Commit

Permalink
Unsuccessful attempt at fixing Colin McRae
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Aug 1, 2022
1 parent 418124c commit 8f26b6c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions GPU/Common/FramebufferManagerCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,6 @@ VirtualFramebuffer *FramebufferManagerCommon::DoSetRenderFrameBuffer(const Frame

// None found? Create one.
if (!vfb) {
gstate_c.usingDepth = false; // reset depth buffer tracking

vfb = new VirtualFramebuffer{};
vfb->fbo = nullptr;
vfb->fb_address = params.fb_address;
Expand Down Expand Up @@ -463,6 +461,12 @@ VirtualFramebuffer *FramebufferManagerCommon::DoSetRenderFrameBuffer(const Frame
// TODO: Is it worth trying to upload the depth buffer (only if it wasn't copied above..?)
}

// We don't try to optimize depth buffer tracking on the frame a framebuffer is created.
// See #7810
gstate_c.usingDepth = true;
gstate_c.clearingDepth = false;
SetDepthFrameBuffer();

// Let's check for depth buffer overlap. Might be interesting.
bool sharingReported = false;
for (size_t i = 0, end = vfbs_.size(); i < end; ++i) {
Expand Down

0 comments on commit 8f26b6c

Please sign in to comment.