makeSharedTexture(descriptor:)
Creates a texture that you can share across process boundaries.
Declaration
func makeSharedTexture(descriptor: MTLTextureDescriptor) -> (any MTLTexture)?Parameters
- descriptor:
An Mtltexturedescriptor instance.
Return Value
A new MTLTexture instance if the method completed successfully; otherwise nil.
Discussion
You can create a shared texture but only with storageModePrivate. You can share the texture with another process by:
Creating a texture handle (see makeSharedTextureHandle())
Passing the texture handle to the other process
Creating a texture in the other process by calling the makeSharedTexture(handle:)method