---
title: "makeSharedTexture(descriptor:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/makesharedtexture(descriptor:)"
---

# makeSharedTexture(descriptor:)

Creates a texture that you can share across process boundaries.

## Declaration

```swift
func makeSharedTexture(descriptor: MTLTextureDescriptor) -> (any MTLTexture)?
```

## Parameters

- `descriptor`: An doc://com.apple.metal/documentation/Metal/MTLTextureDescriptor instance.

## Return Value

Return Value A new MTLTexture instance if the method completed successfully; otherwise nil.

## Discussion

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 important: You can share a texture with another process that uses the same GPU, but not with a different GPU.

## See Also

### Creating textures

- [makeTexture(descriptor:)](metal/mtldevice/maketexture(descriptor:).md)
- [makeTexture(descriptor:iosurface:plane:)](metal/mtldevice/maketexture(descriptor:iosurface:plane:).md)
- [makeSharedTexture(handle:)](metal/mtldevice/makesharedtexture(handle:).md)
- [minimumLinearTextureAlignment(for:)](metal/mtldevice/minimumlineartexturealignment(for:).md)
- [minimumTextureBufferAlignment(for:)](metal/mtldevice/minimumtexturebufferalignment(for:).md)
