-
-
Notifications
You must be signed in to change notification settings - Fork 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
[Testers Needed][Optimization] SPU/PPU: Qualify PUTLLC updates with no data changes #12030
Conversation
Added another optimization mainly affecting TSX. |
@@ -2624,6 +2624,21 @@ bool spu_thread::do_putllc(const spu_mfc_cmd& args) | |||
const auto& to_write = _ref<spu_rdata_t>(args.lsa & 0x3ff80); | |||
auto& res = vm::reservation_acquire(addr); | |||
|
|||
if (cmp_rdata(to_write, rdata)) |
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 should be under the rsx lock below. Some games are not properly synchronized, which is why I have the "limit scope" warning below. I could not use a smaller scope without side effects.
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.
Or maybe we can ask users to verify, the code has changed too much since it was originally written, no idea if its still an issue. Needs a fairly slow CPU with no TSX though.
Before: |
I'm noticing a significant fps decrease in Metal Gear Online (over 100%). This is a really unusual case that has been bothering me for a bit. In both cases (Before & PR), setting As I was writing this, you pushed another commit 16f3da1 and that seems to have improved FPS a bit but it still doesn't match what it was before. Also, please note that we use a custom launcher (NPMG00010) and build for Metal Gear Online. I am positive neither of these are affecting the results. If it's absolutely required, I can show the results on an unmodified build and game but it requires a lot more effort on my end. |
Perhaps MGO has smth speciffic, but have no fps difference in MGS4 |
That's definitely the case, but I'm not sure what. It's quite frustrating because we would like to move on from 0.0.8 to a more recent build. I know both engines are very similar. MGO is based on the MGS4 engine and they share much of the same code. I tried disabling all HLE network related functions but it had no effect on performance. I figure since this PR directly affects MGO it may lead to someone realizing what the bottleneck could be. |
Retest. |
Try not to disconcert the memory cache.
dfc9815
to
879d425
Compare
Performance is worse after dfc9815 (69fps before, 60fps now) Once again, performance is significantly better / back to normal with Accurate RSX/PPU Reservations enabled (maybe slightly worse than it was before). I did notice the FPS in the game menus seems to be faster than before with this PR. I am reaching ~430fps in the menus whereas before it would always stay below 400. |
Log? |
Upon re-testing performance seems a lot closer. Maybe some variance due to exact camera location and the training dummies moving in the background. |
Steam Deck - PUTLLC Before: 2408 ms |
Added an ultra hack for non TSX, please test if improves or regresses performance in games. |
Last commit worse in the test |
Updated the hack to be near purely performance advantageous. |
I'm seeing a few percent increase in fps in some areas. In other areas it's about the same. In any case, this hack is a massive improvement for MGO. I also tested MGS4 briefly, and I can't say I noticed any difference on my machine. I suspect it may improve performance on machines that are SPU bottlenecked though. |
Last update - tests back to normal, MGS still fine |
In "Beyond: Two souls" the performance in the Intro screen has reduced Master : 8-10 FPS PR: 5-9 FPS Note: This is on a quad Core CPU(i5-7300HQ). The game uses SPU heavily & gets bottlenecked due to the low CPU core count. EDIT: Looks like when the window is unfocused(e.g. keep snipping tool in the front and GLFrame window behind it), there is a FPS increase with this PR. With master there is no considerable FPS difference between Keeping the GLFrame focused and unfocused |
I'm reporting back after some more testing with Metal Gear Online. I was curious how it would run for lower end hardware, and for people that would struggle to maintain 30fps previously. I also tested on my machine under Linux, and performance even better there. Linux 12700k (+20fps)On Windows this same spot is 118fps. Without this PR (on Windows) it's 108fps. The following were taken on a i7 10700, but with a severely gimped off-brand motherboard and power supply. This user in particular struggled to get decent fps. Even my old r5 3600 was performing much better than his CPU. It's hard to capture direct comparisons in a multiplayer match, so I also included the gameplay streams. The biggest difference is in the lows. I'm guessing this is mainly due to not need Accurate PPU Reservations anymore. We essentially saw improvements across the board. We tested with a 3600, 3700x, 5950x, 9700k, 10700, and a 12700k. |
What do you mean not needing Accurate PPU Reservations? this pr is not meant to fix that. |
I mean that's probably the main reason FPS is so much better in MGO, whereas other titles that didn't require the setting are only seeing marginal improvements. Whether or not it's not meant to fix it, it does 😄 |
is it possible to retest this with the latest optimizations introduced? |
See #12628 |
Please test if there are regressions albeit there should be none. This affects TSX and non-TSX as one.