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

GS/HW: Try to keep old targets around without overlap or dirty areas #11028

Merged
merged 1 commit into from Apr 15, 2024

Conversation

refractionpcsx2
Copy link
Member

@refractionpcsx2 refractionpcsx2 commented Apr 2, 2024

Description of Changes

Try to avoid deleting targets which haven't been overlapped or dirtied.

Rationale behind Changes

Some games will preload some information then not touch it until after the game loads, but we eject things that haven't been used for 300ish frames, so sometimes this data can be ejected.

Same can happen for games if you spend too long in a pause screen/menu, causing the game to corrupt when you go back. An example of this may be using the shop in the Ratchet games, or changing the background in King's Field 4, then back again after waiting.

Suggested Testing Steps

Try games you think suffer from above, it might help.

Fixes #7332

@AmyRoxwell
Copy link

Fixes silent hill 3 throwing garbage on the status screen after idling a while on the options/map/memo menus
Master:
Screenshot_04_04_2024-17
Pr:
Screenshot_04_04_2024-22

Only way to make it happen again is switching from hw to sw render.

@bigol83
Copy link

bigol83 commented Apr 4, 2024

This also fixes Silent Hill 2 inventory bug

Master

Silent Hill 2_SLES-50382_20240404211752

PR
Silent Hill 2_SLES-50382_20240404211842

@RedDevilus
Copy link
Contributor

RedDevilus commented Apr 5, 2024

Tomb Raider Legend:
Go to Craft Manor

Master:
Tomb Raider - Legend_SLES-53908_20240405035357
Tomb Raider - Legend_SLES-53908_20240405040020
snaps.zip

PR:
Tomb Raider - Legend_SLES-53908_20240405040402

[  152.4500] Extending life of target for 3460
[  152.4579] Extending life of target for 3320
[  152.4584] Extending life of target for 3300
[  152.4588] Extending life of target for 32e0
[  152.4590] Extending life of target for 32c0
......

@refractionpcsx2 refractionpcsx2 changed the title GS/HW: Try to keep old targets around without overlap or dirty areas [TEST ONLY FOR NOW] GS/HW: Try to keep old targets around without overlap or dirty areas Apr 9, 2024
@refractionpcsx2
Copy link
Member Author

refractionpcsx2 commented Apr 9, 2024

Okay I'm removing the test flag since this looks promising. I'll leave the other changes I made for now so we can see when it's working its magic

But still need tests for the following scenarios

ffx intro scene changes leave the old image untouched for a couple of frames
(Disgaea 2 fmv when booting the game through the BIOS)
Xenosaga 2 needs at least 240, else it flickers on scene transitions

@prafullpcsx2
Copy link
Contributor

This also fixes Silent Hill Origins #7332

@AmyRoxwell
Copy link

ffx intro scene changes leave the old image untouched for a couple of frames

It is detected on the console but nothing changed tbh, at least for me on international:

Master:
Screenshot_04_09_2024-4

PR:
Screenshot_04_09_2024-6

Same for title screen, tried to stall as much as possible on the load screen, nothing happened:

Master:
Screenshot_04_09_2024-5

PR:
Screenshot_04_09_2024-2

@RedDevilus
Copy link
Contributor

RedDevilus commented Apr 10, 2024

Too bad it doesn't fix some games like Star Wars Ep3 but it does say something in the logs
[ 73.1849] Extending life of target for 3580
StarWarsEp3PauseMenu.zip

Keep in mind this also happens on master, so no apparent changes happened.

Repro:
HW renderer into a level, press pause, press F9 for SW

Star Wars - Episode III - Revenge of the Sith_SLES-53155_20240410175231
Star Wars - Episode III - Revenge of the Sith_SLES-53155_20240410175235

@JordanTheToaster
Copy link
Contributor

JordanTheToaster commented Apr 15, 2024

Fixes missing reflections on window and sheen on roof in Burnout 3 and Revenge.

image

@bigol83
Copy link

bigol83 commented Apr 15, 2024

Another Burnout 3 comparison to show the difference between Master and PR

Master
Burnout 3 - Takedown_SLES-52585_20240415130641

PR
Burnout 3 - Takedown_SLES-52585_20240415130610

This is with High Blending for Software accuracy

@refractionpcsx2 refractionpcsx2 merged commit 79a882d into master Apr 15, 2024
23 checks passed
@refractionpcsx2 refractionpcsx2 deleted the gs_nokill branch April 15, 2024 18:05
@DonelBueno
Copy link

The added reflections on Burnout Takedown cars vanish upon loading state or switching renderers.

@refractionpcsx2
Copy link
Member Author

They will, nothing I can do about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Silent Hill Origins broken inventory screen
7 participants