-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Replace cached GSOffset with live calculations #4348
Replace cached GSOffset with live calculations #4348
Conversation
505d14e
to
bc3d50e
Compare
tour de france doesn't have memory leak anymore. memory usage doesn't get much higher than 560mb. characters and other UI elements flicker in and out of existence which is new (incorrect) behavior. |
multiframe dump. |
0a6064b
to
57a4e95
Compare
@seta-san try now |
works perfect now. |
Is this fix gonna be included in a dev build of PCSX2? |
Once the PR is merged into master, it will be in the latest dev build yes. |
1315f18
to
ad004a5
Compare
|
||
unsigned long j; | ||
|
||
while(_BitScanForward(&j, p)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a micro optimization from greg for reducing the source cache invalidation time with the old page validity bitmap; It might be a good benchmark to compare the time spent in the GSTextureCache::SourceMap::RemoveAt before and after the modifications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm the two commits that modified it before were fa1377a and e58776e
fa1377a looks like it was adding a caching system that's since been replaced, though it does name Champion of Norrath as the game to profile for this section of code
e58776e is the one that adds the _BitScanForward
and doesn't mention what games it's trying to improve
So does anyone have Champion of Norrath (or a gsdump of it) to profile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Champions of Norrath is just a Snowblind engine game, so any game using that, for example Baldurs Gate, will probably do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My memory has betrayed me about the git history, sorry. Anyway I tested the beginning of Baldur's Gate: Dark Alliance, and it is even a tad faster now! Great job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an update, since it's been a few months since my last comment on this build. I was able to complete Remote Control Dandy SF 100% using this build. I only encountered some geometry issues during cutscenes, but everything was near-perfect during gameplay. The only other issue I had was some random crashes which happened hours apart from eachother, so I'm attributing those to the nature of this being an experimental PR build.
This build seems to have fixed the issue with Remote Control Dandy SF, which would cause the game to crash after about 10 to 15 minutes of playing. In my testing thus far, I have been able to play the game for an hour and 10 minutes without experiencing any crashes. If anyone else would be interested in testing RCD SF with this build as well, and for a longer period of time, please feel free to do so. |
ANOTHER KONAMI GAME |
Ultimate Spider-man doesn't seem to crash anymore even after 30 min, though the game suffers from other problems like texture cache. |
this may also effect "Anubis: Zone of Enders" from 5chan |
83cd83a
to
ba110a1
Compare
Speaking of 5ch
|
ba110a1
to
b714567
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with Colin McRae Rally 3 and Grand Theft Auto: LCS
Both seem to work fine, CM Rally seemed to be a couple of fps faster
GTA: LCS seemed to be a touch slower
The difference is very minuscule and could just external factors.
|
8158184
to
cca632a
Compare
Not really a bug but an observation, there's a 2D screen after the main menu of Drakengard which on Master starts around 70fps and then drops down to 40fps after a few seconds (toggling F9 brings it back up for a short while), however on this PR it is constantly at 40fps no matter what. This is obviously evidence of the game spamming crap to flush the draws or something, but I figured it interesting to mention. I should note that Software mode sits around 60-90fps |
Code for the full calculation was way too complicated to run for every pixel in a loop
cca632a
to
b5c9529
Compare
b5c9529
to
99d8fcf
Compare
how to install this update on the pcsx2? I am just rookie |
@Rasiohead91 go to https://pcsx2.net/downloads/ and scroll down to where you see 1.7.27XX , if you have any other issues join the discord/ forums thats linked in the readme :) , |
3q very much,and the latest version is the best? |
I would assume having a big ass button would tell you that yes, the latest version is the best. |
Should fix #2686, please test
The non-cached calculations are pretty fast, but generally not quite as fast as the cached versions. I haven't noticed any slowdown in anything I've tested, but it might be good for others to test.
Also this makes heavy use of lambdas hoping they'll be inlined, so we should performance test MSVC and make sure it actually does
Finally, we haven't used them much before, so what are people's thoughts on formatting lambdas passed to functions? I went with this (indented like you would the content of a loop):
but we could also go with this
or this
I personally would like to not go with clang-format's preference of this, it destroys horizontal space
Same question for locals
auto helper = [&](...) { };
or
auto helper = [&](...) { };