wrap of MTLBufferProtocol to handle specific code related to ios/osx TODO: check if there is a more idiomatic way to do this
TODO: may not working on ios "In iOS and tvOS, the managed storage mode is not available." https://developer.apple.com/documentation/metal/mtlstoragemode/managed