#[repr(transparent)]pub struct MTLStorageMode(pub NSUInteger);MTLResource only.Expand description
Describes location and CPU mapping of MTLTexture.
In this mode, CPU and device will nominally both use the same underlying memory when accessing the contents of the texture resource. However, coherency is only guaranteed at command buffer boundaries to minimize the required flushing of CPU and GPU caches. This is the default storage mode for iOS Textures.
This mode relaxes the coherency requirements and requires that the developer make explicit requests to maintain coherency between a CPU and GPU version of the texture resource. In order for CPU to access up to date GPU results, first, a blit synchronizations must be completed (see synchronize methods of MTLBlitCommandEncoder). Blit overhead is only incurred if GPU has modified the resource. This is the default storage mode for OS X Textures.
This mode allows the texture resource data to be kept entirely to GPU (or driver) private memory that will never be accessed by the CPU directly, so no conherency of any kind must be maintained.
This mode allows creation of resources that do not have a GPU or CPU memory backing, but do have on-chip storage for TBDR devices. The contents of the on-chip storage is undefined and does not persist, but its configuration is controlled by the MTLTexture descriptor. Textures created with MTLStorageModeMemoryless dont have an IOAccelResource at any point in their lifetime. The only way to populate such resource is to perform rendering operations on it. Blit operations are disallowed.
See also Apple’s documentation
Tuple Fields§
§0: NSUIntegerImplementations§
Trait Implementations§
Source§impl Clone for MTLStorageMode
impl Clone for MTLStorageMode
Source§fn clone(&self) -> MTLStorageMode
fn clone(&self) -> MTLStorageMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more