Closed cai502 closed 10 months ago
info added for macbook pro 19
Hmm, ok. That code is relatively recent, looks like I ignored this little tidbit that StorageModeShared textures are not allowed on Intel GPUs:
https://developer.apple.com/documentation/metal/mtlstoragemode/mtlstoragemodeshared#discussion
Since it looks like that by default Metal does the right thing, I will just remove the explicit storage mode selection again.
Thanks for the bug report!
PS: for a quick workaround you can set the sg_desc.mtl_force_managed_storage_mode
option to true in the sg_setup()
call, but I'll try to provide a proper fix asap.
PPS: after dusting off my old Intel Mac with Big Sur and Xcode 12 I actually have a couple of more problems (sokol_gfx.h doesn't build because some declarations from more recents SDKs aren't properly conditionally compiled.
I'll see if I can get this stuff to work later today.
Ok, this should be fixed in https://github.com/floooh/sokol/pull/907, basically Intel Macs now use managed storage mode for all resource types (that's the same as it worked before I tried to be clever). On Apple GPUs (and generally on iOS) shared resource storage mode is used.
I'll merge this in a couple of hours.
Cool, thanks very much!
PS: I tested this on my mid-2014 13" MBP with Big Sur and Xcode 12, my M1 MBP, and the iOS simulator.
Crash occurs on macbook pro 19 only when Xcode Metal API Validation enabled.
But macbook pro 21(with M1 Chip) is ok.