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 16, 2022
1 parent ec84046 commit 46979cd
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 @@ -425,8 +425,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 @@ -470,6 +468,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 46979cd

Please sign in to comment.