setPurgeableState(_:)
Set (or query) the purgeable state of the image’s underlying texture.
Declaration
func setPurgeableState(_ state: MPSPurgeableState) -> MPSPurgeableStateParameters
- 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 setPurgeableState(_:) method of the MTLResource class, except that the state might be MPSPurgeableState.allocationDeferred, 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.