Trying to call [MTLDevice newTextureWithDescriptor:iosurface:plane:]
on an Apple Silicon mac, where the descriptor specifies MTLStorageModeShared
, I am getting a failed assertion error:
-[MTLDebugDevice newTextureWithDescriptor:iosurface:plane:]:2387: failed assertion `Texture Descriptor Validation
IOSurface textures must use MTLStorageModeManaged
I don't really understand why we have this limitation, MTLStorageModeShared
textures are supported on Apple silicon (despite the documentation in https://developer.apple.com/documentation/metal/mtldevice/1433378-newtexturewithdescriptor?language=objc which claims overwise.