[MacOS] Corrupt pipeline cache when when booting game a 2nd time #396
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm using the latest commit
271a4e4
nightly and the latest molten-vk via homebrewI've noticed that if I run BOTW it all runs fantastic!!
Then if I quit and boot the game again, it crashes instantly with the error
Failed to create pipeline cache
If I then delete the shaderCache folder then I can boot again and it works great again.
This is the full log
You should report that to the MoltenVK project
This issue can be reliably reproduced when rendering Kakariko Village inside Breath of the Wild.
Steps to reproduce:
(using version 1.5.0 / "208")
Now Cemu will crash when loading BotW, with the same error message as OP provided
What happens when you run your emulator with the Vulkan validation layer enabled? (You don't even have to do this on a Mac; you can use Linux or Windows for this as well.)
RPCS3 had a very similar issue and it was caused by the default thread stack size being too small.
RPCS3/rpcs3@0d1c0e72a6
(though I don't recall issues with pixel formats, so it may be unrelated)
Anyone have a definite fix to this issue as of now?
Im back, 3 months later, and there is still no definite fix to this issue.
However, I do have a temporary solution that works for me every time.
Following the path below:
Macintosh HD/Users/USER_NAME/Library/Caches/Cemu/
Once we open the path we find a folder named
shaderCache
Delete that, then open the game and you can play it normally, however, as expected, you would have a poor gaming time because the mac needs to regenerate every shader again.
Another method is just to open the cemu menu, then right click the game, then click
remove shader caches
.It does the same thing, but just faster.
Both ways lead to the deletion of the shader caches and generated pipelines, which would make it pretty slow but like it works so i'll take it as a temporary solution.
Hey @EDED2314 I have found that you only need to delete
shaderCache/driver/vk/00050000101c9400.bin
. This only affects startup and there is no need to regenerate in-game shaders, so gameplay will not be impacted. I am using a basic AppleScript application to automate this on Cemu startup since I got annoyed with doing it myself. Here is how you can do the same:CemuFix.app/Contents/Resources/applet.icns
to the icon of your choosing (easiest to just copy the Cemu icon, but fun to do a BOTW icon)It's a workaround/quick fix, but it works for now.
Could you share that file? Perhaps it can help people from MoltenVK fix the underlying issue.
I recommend this: https://github.com/kailous/BotwLaunch
Sadly at one point when the cache gets too big, I would still have to delete the cache...
this is not the best way but if you copy the shader renders folder to the desktop before lunching the game and when its started replace the new folder in cache with the one in the desktop, you can play nicely.
Is there no solution to this yet?
Hey for me it crashes when loading the cached Vulkan pipelines, only when those get above ~4180. If that's also your case you only need to delete the file ending in vkpipeline.bin in Library/Caches/Cemu/shaderCache/transferable/ and not the shaders one. Pipelines compile way faster than shaders so not having to recompile shaders is already an improvement to reduce stuttering when loading your save.
Furthermore, if you walk around a little after loading the game and quit you should get less than 4000 cached pipelines that you can backup and paste in the above folder before every play session to further reduce and perhaps even eliminate stuttering when first loading.
With those two tricks I get to play very smoothly since recompiling just the pipelines and not the shaders when exploring does not impact my performance at all. That said I'm on an M3 pro so your mileage may vary.