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

# makeSharedTexture(handle:)

Creates a texture that references a shared texture.

## Declaration

```swift
func makeSharedTexture(handle sharedHandle: MTLSharedTextureHandle) -> (any MTLTexture)?
```

## Parameters

- `sharedHandle`: An doc://com.apple.metal/documentation/Metal/MTLSharedTextureHandle instance, typically from another process using the same GPU device.

## Return Value

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

## Discussion

Discussion Call this method from the same MTLDevice instance that created the shared texture instance. tip: You can identify the correct device with the texture handle’s device property.

## See Also

### Creating textures

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