-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
SPU/LV2: Fix tiny race conditions #12678
Conversation
@@ -766,9 +765,9 @@ bool cpu_thread::check_state() noexcept | |||
} | |||
else | |||
{ | |||
if (cpu_can_stop && !(flags & cpu_flag::wait)) |
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 block of code was not correct and could have set wait flag on emulation stopping even if we are inside of a function and need wait flag disabled (this can degrade savestates' accuracy for example). I've previously added wait flag after cpu_task() return which is the correct place for it.
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.
It also used to set wait flag on function return (cpu_flag::ret) which is incorrect either.
2b1da86
to
92475ed
Compare
* sys_ppu_thread: Fix surmixer hack * Hotfix after #12678
@elad335 for some reason something in this pull request has broken the caching/streamed files in GHL. Here is a post with more information. No idea if it's having issues to where it's like locking up something causing the game to lag, or issues with writing, or memory. I'd be grateful if you could look into it again since i have plans to release my server for the game at some point this year but sadly this issue likely makes it so i can't release the server for the game. Thanks. |
@elad335 Do you have any idea why this is breaking other games? They works on real PS3 hardware but after this patch not with RPCS3. |
Writing to VM memory while CPU wait flag is set is no laughing material, in this case, SPU reservation operations may eliminate these writes because they aren't tracked by the SPU in case they share a single byte or more of reservation data within the 128-byte cache line.