---
title: allowGPUOptimizedContents
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtltexture/allowgpuoptimizedcontents
---

# allowGPUOptimizedContents

A Boolean value indicating whether the GPU is allowed to adjust the contents of the texture to improve GPU performance.

## Declaration

```swift
var allowGPUOptimizedContents: Bool { get }
```

## Discussion

Discussion The value is set when the texture is created and never changes. If the value is true, Metal is allowed to adjust the texture’s contents to improve GPU performance. For a shared or managed texture, this optimization can cause slower performance when accessing the texture from the CPU. If the value is false, CPU reads and writes may be improved at the cost of some GPU performance.

## See Also

### Querying texture attributes

- [textureType](metal/mtltexture/texturetype.md)
- [pixelFormat](metal/mtltexture/pixelformat.md)
- [width](metal/mtltexture/width.md)
- [height](metal/mtltexture/height.md)
- [depth](metal/mtltexture/depth.md)
- [mipmapLevelCount](metal/mtltexture/mipmaplevelcount.md)
- [arrayLength](metal/mtltexture/arraylength.md)
- [sampleCount](metal/mtltexture/samplecount.md)
- [isFramebufferOnly](metal/mtltexture/isframebufferonly.md)
- [usage](metal/mtltexture/usage.md)
- [isShareable](metal/mtltexture/isshareable.md)
- [swizzle](metal/mtltexture/swizzle.md)
- [MTLTextureType](metal/mtltexturetype.md)
- [MTLTextureUsage](metal/mtltextureusage.md)
