Set (or query) the purgeable state of the image’s underlying texture.
SDKs
- iOS 10.0+
- macOS 10.13+
- Mac Catalyst 13.0+
- tvOS 10.0+
Framework
- Metal Performance Shaders
Declaration
- (MPSPurgeable State)setPurgeableState:(MPSPurgeable State)state;
Parameters
state
The desired purgeable state of the image’s underlying texture.
Return Value
Returns the prior purgeable state of the image’s underlying texture.
Discussion
This method behaves the same as the set
method of the MTLResource
class, except that the state might be MPSPurgeable
, which means there is no underlying texture to mark as volatile or non-volatile. Attempts to set a purgeable state on MTLTexture
objects that have not yet been allocated will be ignored.