-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Better ways to deal with overlapping render targets #15728
Comments
I've been thinking more about this and I'm convinced now that allowing multiple overlapping targets to exist with different formats and other properties to exist, and do the necessary copies on bindframebuffer similar to our existing depth copies, is really the way to go. Let's call this a "resolve". One wrinkle is that these resolves might need to happen when binding a texture in the wrong format, too - we'll then create the missing-format render target on-demand, and resolve to it (which will result in a reinterpret). This makes it practical to allow overlapping framebuffers with multiple formats, even 32-bit vs 16-bit, and do reinterpret blits at bind time (hopefully we'll be able to bound these rectangles... maybe we even need lists of bounding rectangles that were updated at a specific time to solve stuff like Cars 2 efficiently). This can also solve the #9576 issue in a cleaner way. I'm going to start with a small version of this that solves it for Juiced 2, and go from there. |
…tions. Leads to much faster performance in Juiced 2. This will later be expanded to handle more things in a more elegant way, like the framebuffer overlap in God of War for the shadows and color reinterpretation in a generic way. Fixes #15728
…tions. Leads to much faster performance in Juiced 2. This will later be expanded to handle more things in a more elegant way, like the framebuffer overlap in God of War for the shadows and color reinterpretation in a generic way. Fixes #15728
…tions. Leads to much faster performance in Juiced 2. This will later be expanded to handle more things in a more elegant way, like the framebuffer overlap in God of War for the shadows and color reinterpretation in a generic way. Fixes #15728
In #15717, I fixed the Juiced 2 rendering issue where two render targets share a bit of data by partially overlapping, by allowing PPSSPP to consider them the same render target. Since a lot of draws are done texturing from one and writing to the other, this leads to a lot of detected "self-texturing" which leads to a large number of expensive copies.
An alternative approach would be to leave the two render targets separate, but on bind, detect other overlapping rendertargets and copy the overlapping areas from the other ones if they're "fresher". A bit similar to what #15700 will do for depth buffers, but with an offset. That would avoid the self-texturing issue entirely, but adds a little bit of complexity that we might not always want to have enabled.
Anyway, if implemented, this should get Juiced 2 speed back to at least where it was before, so might be worthwhile in the future.
The text was updated successfully, but these errors were encountered: