Encodes a command to optimize a texture for better performance when the CPU accesses it.
- iOS 12.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 12.0+
The texture to optimize.
You can access shared and managed textures from both the CPU and the GPU. If you will access a texture from the CPU for an extended period of time, call this method to optimize access to the texture from the CPU.
When this command is executed, the Metal device can make changes to the resource to improve performance on the CPU, so long as those changes do not result in a loss of data. The GPU can still read data stored in this texture, and will get the same results, but possibly at a performance penalty.