---
title: usage
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtltexturedescriptor/usage
---

# usage

Options that determine how you can use the texture.

## Declaration

```swift
var usage: MTLTextureUsage { get set }
```

## Mentioned in

Developing Metal apps that run in Simulator

## Discussion

Discussion The default value for this property is shaderRead. If the given texture has multiple uses in your app, you can combine multiple usage options for that texture. After you set a texture’s usage options, you can use it only in the ways that you specified. Metal can optimize operations for a given texture, based on its intended use. Set explicit usage options for a texture, if you know them in advance, before you use the texture. Only set usage options that correspond to a texture’s intended use. In iOS devices with GPU family 5, Metal doesn’t apply lossless compression to a given texture if you set any of these options: unknown shaderWrite pixelFormatView

## See Also

### Specifying texture attributes

- [textureType](metal/mtltexturedescriptor/texturetype.md)
- [pixelFormat](metal/mtltexturedescriptor/pixelformat.md)
- [width](metal/mtltexturedescriptor/width.md)
- [height](metal/mtltexturedescriptor/height.md)
- [depth](metal/mtltexturedescriptor/depth.md)
- [mipmapLevelCount](metal/mtltexturedescriptor/mipmaplevelcount.md)
- [sampleCount](metal/mtltexturedescriptor/samplecount.md)
- [arrayLength](metal/mtltexturedescriptor/arraylength.md)
- [resourceOptions](metal/mtltexturedescriptor/resourceoptions.md)
- [cpuCacheMode](metal/mtltexturedescriptor/cpucachemode.md)
- [storageMode](metal/mtltexturedescriptor/storagemode.md)
- [hazardTrackingMode](metal/mtltexturedescriptor/hazardtrackingmode.md)
- [allowGPUOptimizedContents](metal/mtltexturedescriptor/allowgpuoptimizedcontents.md)
- [swizzle](metal/mtltexturedescriptor/swizzle.md)
- [MTLTextureSwizzleChannels](metal/mtltextureswizzlechannels.md)
