-
-
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
Async #4876
Async #4876
Conversation
I'm curious, and so people are aware, should we expect similar issues to those that Dolphin saw when they tried asynchronous shaders? Or do these kinds of issues not occur in RPCS3? I'll quote their Ubershaders blog post:
|
In all games I tested (P5, Project Diva, Drakengard 3, NieR Replikant, Infamous), it works just as note2 says, massive pop-ups everywhere, and have not met with any problems. It lags when few first shaders are loading, after that it plays while loading more and more, and at the end works as normal. No drops or increase in performance, no dropping OOB. That's why I'm not sure if it's a needed thing at all... |
Try with this PR vs Master with Asura's Wrath or Uncharted, the difference is huge. Asura's Wrath doesn't perform well on master unless you spend atleast a few hours compiling shaders. With this PR the amount of shaders that compile is significantly lower the game now performs well with a clean cache. Saying that it's not needed is just wrong. |
Also some games will crash if the emulator slows down to a crawl because the developers did not account for low framerates. This largely evades this issue. |
@ruipin ofc they are there. Dark souls character portraits are a good example (drawn once and copied) and if you have no shaders ready they will never appear. |
Did short tests on P5, Lollipop Chainsaw, Bayonetta, Demon's Souls and Ni No Kuni. On my system (i7 6700K) shader compilation stutter is practically removed. This is nothing less than spectacular, I can hardly believe it. Great work! |
Just tried it with Project Diva F without any shader cache, I can finally now play a song (when playing it for the first time mind you) without restarting it once or twice due to shader compilation. |
Just played a bit of Medal of Honor: Airborne and the shader stutter is almost completely gone! I can actually play a for a bit without it being a slideshow. Nothing short of amazing! |
Testing GT HD Prologue and doesn't stuck anymore changing the camera angle |
TOCS2 [BLUS31597] is a game for a while now that doesn't suffer from shader compiling stutter. The observation with this PR is that the map loading times are now faster (by a few short seconds) where there is no precompiled shader cache that is already present. The visual effect seen upon loading is a world map that is being rendered on the fly piece by piece for the duration of only a few very short seconds, where it is then completely rendered. (As described in kd-11 Note2.) |
Will there be an option to keep the synchronous shaders after this PR? Figured that will be easier for debugging and testing, since some games may draw some objects only once. |
You can still use synchronous shaders. The option already exists and will be added to the GUI. |
tested person 5, much better, and in some occasions where there use to be some heavy stutter now its gone, some times even without any observable issue, though there are occasions where it stills crawls on his knees. edit: I was using spu llvm, thats why I still had the stuttering as pointed out on the comments. |
This PR branch including fixes branch now freezes my client upon game load and bring to front. Game Works flawlessly if not clicked on. but when brought onto front screen 'in focus' freezes but game can still be interacted with(audio says so) Fixes #4869 Build 0.0.5-8ba10462 3 days ago: works (edit: seems to be last build that worked) Just a heads up just in case as you might have an idea. It seems no one else has the issue yet. |
Tested with P5 .Make sure to use SPU ASMJIT (Giga also work well) and disable Zcull . Also SPU LLVM still have intermittent shutter when using async shader here. |
I also experience the freeze that Buzzing described. When the screen is clicked on rpcs3 window stops responding but game is still running this happens both for disable async=true and false. On "disable async=false", Lags due to shader compilation has been dramatically reduced! Great work! Specs: Win 10, Gtx 1060, Intel Avx cpu, D3 blus31437 |
Dragon Ball Raging Blast 2 freezes with async both Vulkan and OpenGL, but I don't think Async works with Vulkan for me, because with openGL it runs better, and it was always slower with OpenGL. You said Raging Blast 2 has problems with fragment shader compilation, right? Do you know approx when it will be fixed? Here is the log. Also, if trophy popup is enabled, the game freezes every time a trophy appears. (In master there are a few times when it doesn't but usually trophy makes it freezes there too.) |
@buzing Not able to reproduce. Are you using any monitoring tools? |
@Patkos96 Async is working but your CPU cannot handle the extra work |
Freezing window bugs are caused by #4878 and have nothing to do with rsx code. This is why its important to test all builds not just rsx ones when checking regressions. |
@spyropt Normal, not an issue read the comment in this PR from kd above. #4876 (comment) |
@kd-11 can i ask from where you know everything this about PS3 and how you know what can emulation improve? Something like this? This is really unwriteable 😄. Absolutely amazing |
@marosis GitHub is not the place for discussion. You can ask on Discord https://discord.me/RPCS3 or our forums https://forums.rpcs3.net/ |
Yeah i understand sorry. Iam only really interrested in. I Will not do it again next time. |
@spyropt that is normal. The game only renders the faces once so once they are skipped they never show up. If you restart the game the shader will have been saved to cache and faces will be ok. Or disable async to force synchronous compilation making sure the writes are always present. Or load a save then return to menu, etc. Anyrhing that triggers the faces to update will show correctly after the first time. |
- Defer compilation process to worker threads - vulkan: Fixup for graphics_pipeline_state. Never use struct assignment operator on vk** structs due to padding after sType member (4 bytes)
Huge improvement on all of my games with deleted shader caches, brings shader compilation from complete lockups to very slight slowdowns. This will make updates that invalidate shader cache much less painful! |
Silent Hill: Downpour now is almost perfect. Occasional frame drops but Shader Compilation without any cache is not causing (almost) any stutter. i7 5820, GTX 1070, 16GB DDR4, SSD. Vulkan, Strict Rendering, 1 SPU and I am getting almost solid 30fps on 1080p. 4k without strict rendering on Vulkan crashes emulator complaining small buffer. OpenGL works fine but framerate suffers a bit on 4k. Amazing work! |
It looks like this PR made white/black flickering in Demon's Souls much less prominent than it was before. I have a Rizen 5 1600 and Radeon RX480. Audio stuttering is still there though. |
@Finoderi did you try running with single spu? |
If you mean one preffered SPU thread, than yes I tried this. It reduces audio and microstuttering a little, but when PC rolls through any breakable object, the game turns to a slideshow. I found out that 4 SPU threads is optimal setting for me. On 5 and 6 threads the game hangs more often for some reason. 2 and 3 are pretty much like 1. |
Async causes F {rsx::thread} class std::runtime_error thrown: Verification failed: |
GT 210 doesn't seem to support OpenGL 4 as per NVIDIA spec page, so that's irrelevant |
@gandalfthewhite19890404 clear shadercache first and make sure you use SPU ASMJIT Recompiler |
NOTE: Includes fixes from #4869 for testing
NOTE2: When shaders are loading in there will be extreme pop-in (missing graphics that will slowly resolve). This is normal. You can disable this functionality in config.yml, set "Disable asynchronous shader compiler" to true.