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

rsx: Minor surface cache improvements #11335

Merged
merged 4 commits into from
Jan 7, 2022
Merged

rsx: Minor surface cache improvements #11335

merged 4 commits into from
Jan 7, 2022

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Jan 4, 2022

Fixes #11316

@Megamouse Megamouse added Optimization Optimizes existing code RSX labels Jan 4, 2022
@Xcedf
Copy link

Xcedf commented Jan 5, 2022

Fixes Assassin's Creed performance regression and it's log spam
master
13
PR
14

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 5, 2022

Reworked things a bit. Now even with log spam and surface removal active the performance impact is very low from some quick testing. Got 35fps -> 60fps even with the removal spam active in prince of persia. I've also tweaked the thresholds again, needs a retest. I'll need to figure out which titles were affected by the removal and verify that they still work. I can only remember SSX.

@Xcedf
Copy link

Xcedf commented Jan 5, 2022

Slower in AC with update
and log spams this single addr
E RSX: Stale surface at address 0xc2380000 will be deleted
E RSX: [Performance warning] Texture gather routine encountered too many objects! x3
image

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 6, 2022

On one hand this is good, since we have almost double the fps even with aggressive cleanup. We just need to tune the algorithm so that the performance hit due to surface removal should never be greater than the performance hit of actually consuming all those sections.

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 6, 2022

Added some new logic that tracks actual overdraw and is much easier to calibrate. Verify if everything is OK now.
Some games are having many small 2D tiles that constitute a large 2D texture and this was incorrectly triggering the overdraw detection when it really shouldn't have.

@kd-11 kd-11 changed the title [WIP] rsx: Minor surface cache improvements rsx: Minor surface cache improvements Jan 6, 2022
@Xcedf
Copy link

Xcedf commented Jan 6, 2022

Got my performance back in AC, spams gone
13

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 6, 2022

By the way, it seems AC spams zcull a lot, relaxed zcull should be optimal for such titles. Likely makes the performance difference more obvious.

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 6, 2022

Actually I can also see zcull crap in prince of persia logs. Likely because the engine is related, same suggestion applies to that one.
I think this PR is good enough for now though, I'll leave it up for testing until tomorrow.

@Xcedf
Copy link

Xcedf commented Jan 7, 2022

AC never spammed Zcull stuff for me, was using Relaxed all the way.

@kd-11 kd-11 marked this pull request as ready for review January 7, 2022 08:03
@kd-11 kd-11 force-pushed the pop08 branch 2 times, most recently from c2819f5 to 97dd7f9 Compare January 7, 2022 19:02
@kd-11 kd-11 merged commit 83026fd into RPCS3:master Jan 7, 2022
@kd-11 kd-11 deleted the pop08 branch January 10, 2022 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Optimization Optimizes existing code RSX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prince Of Persia 2008 performance degradation
3 participants