-
Notifications
You must be signed in to change notification settings - Fork 261
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
VK Out of memory on MacBook Pro M1 #970
Comments
Could be a dupe of #940. I’m just running a vanilla compile of latest master. Not set any options. |
Yes, quite possibly a dup of #940. You could verify by testing with the following cvar change: +set r_useHierarchicalDepthBuffer 0 (on the command line, in the console, or in autoexec.cfg). I am also experimenting with a better fix for Apple Silicon by disabling the use of MoltenVK's Metal Argument Buffers. This would allow blood reflections to continue working (which requires the HiZ Depth Buffer). You could test this as an alternative: +set r_mvkUseMetalArgumentBuffers 0 (must be on the command line or in autoexec.cfg, cannot change in console). Please let me know if either of these things work for you. (@RobertBeckebans I believe the root cause may be a driver limitation where shader subgroups do not work properly in all circumstances on macOS/MoltenVK and possibly on linux for iGPUs - note this feature is used in the hiz compute shader. I am playing around with MoltenVK settings to see if I can overcome the problem for Apple Silicon. I currently don't have a solution for linux iGPUs other than disabling HiZ). |
with +set r_useHierarchicalDepthBuffer 0 on command line
So different in not a memory issue. Looks like a synchronisation issue. with +set r_mvkUseMetalArgumentBuffers 0 on command line
With both of them - it works ... but it really slow. I can't remember how to show the FPS but I guess it was running at around 10 FPS |
@bigianb thanks for trying out those settings. However, I am a bit confused about needing both. When I test on my M1 Air, all I need is
With Metal Validation set to on in Xcode I get the same Metal Debug error as you indicate above. In any case, with the The more important issue now becomes the macOS+M1 performance limitation that exists on the master branch. This is due to the way the game pushes shader parameters to MoltenVK and the M1 GPU. To solve this, I am maintaining a parallel branch that changes the way this is done and is more performant on macOS in general and especially on Apple Silicon. This branch is up to date with master and you can test it at #855. However, until I submit a more permanent fix for the Metal Argument Buffers issue to master (and rebase my branch), you will still have to Please try out my custom branch and let me know how it goes for your machine. FYI - to show FPS, first enable the console ( |
cool. I'll give that a go in the next day or so and let you know.. |
Running on MacBook Pro M1 (16Gb) - compiled using Xcode from latest.
Copied base dir over from GOG version and then copied the base folder in GitHub over that.
All is good until starting a new campaign. The first map loads but then I hit an out of memory error with Vulkan. I can dig into it more but first wanted to know if this is unexpected. Also, am I missing a step somewhere? I seem to be missing env maps but I didn't see them in the download from moddb - I don't think that would cause the error though.
Tail of the output looks like:
Full log is as follows (I removed some repetitive lines ... and noted where).
The text was updated successfully, but these errors were encountered: