GS/TC: Refactor/cleanup preload function.#14300
Conversation
e891136 to
58d211a
Compare
|
The condition for nuking should also depend on if the old target height is more than one page if the widths don't match. So if the old width is > new width, or the old width is < new width but height is > 1 page, then it's not going to neatly fit. So you'll need to make sure these conditions are met, else pages will need copying in a rearranged format (which is also a possible solution, but requires more work, maybe leveraging thre "merge target" function). Just something to keep in mind :) |
|
I see, thanks for explaining that. In this case the draw is overwriting exactly the bottom 64 pixel strip of the old target. The old/new will be misaligned since it’s 2 rows of pages. Maybe we could just crop the old target in this case? |
|
so it's an inside target but a width aligned offset? Hmm why is it preloading, then, and not doing RT in RT? |
Description of Changes
Does some light refactoing/cleanup to
GSTextureCache::PreloadTarget().Rationale behind Changes
Fixes the long dump in #13308. Should be checked in game since it's multiframe.
The main effective change in the code is changing the following condition that determines whether to nuke an old targets in preload (pseudocode):
to
Previously, the code allowing nuking the old target even the new target had a smaller buffer width, which seemed to have caused the clock tower issue.
Suggested Testing Steps
Test any game with any HW renderer.
Tested so far with a dump run at native resolution.
Did you use AI to help find, test, or implement this issue or feature?
No.