Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sequence numbers instead of a tracking array for depth buffers #15854

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

hrydgard
Copy link
Owner

Works just as well (Asphalt still works), and is much simpler.

Should have thought of this first, heh.

@hrydgard hrydgard added GE emulation Backend-independent GPU issues Code Cleanup Cleanup to make future work easier. Needs to be done sometimes. labels Aug 17, 2022
@hrydgard hrydgard added this to the v1.14.0 milestone Aug 17, 2022
@hrydgard hrydgard merged commit abfbad9 into master Aug 17, 2022
@hrydgard hrydgard deleted the remove-depth-buffer-tracking branch August 17, 2022 09:37
Copy link
Collaborator

@unknownbrackets unknownbrackets left a comment

Choose a reason for hiding this comment

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

Right, I agree that using a generation count / sequence number is more straight forward. I think it allows us more options on overlap too.

A thing we haven't thought about yet (and hopefully won't have to...) is if a game renders at an X offset into a depth buffer or something.

-[Unknown]

}
}
// We use a special fragment shader flag to convert color to depth.
vfb = GetLatestDepthBufferAt(params.fb_address /* !!! */, params.fb_stride);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: This looks as much like "important, fb was intentional here" as "TODO, gotta change something here."

-[Unknown]

@@ -2220,6 +2174,7 @@ void FramebufferManagerCommon::ReadFramebufferToMemory(VirtualFramebuffer *vfb,
// We'll pseudo-blit framebuffers here to get a resized version of vfb.
if (gameUsesSequentialCopies_) {
// Ignore the x/y/etc., read the entire thing.
// TODO: What game did we need this for?
Copy link
Collaborator

Choose a reason for hiding this comment

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

IIRC, Grand Knights Historia was one of them but I think there were a few. It was because some games would memcpy regions in strips, or many smaller regions from a larger framebuffer.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Cleanup Cleanup to make future work easier. Needs to be done sometimes. GE emulation Backend-independent GPU issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants