#[repr(transparent)]pub struct MTLCPUCacheMode(pub NSUInteger);Available on crate feature
MTLResource only.Expand description
Describes what CPU cache mode is used for the CPU’s mapping of a texture resource.
The default cache mode for the system.
Write combined memory is optimized for resources that the CPU will write into, but never read. On some implementations, writes may bypass caches avoiding cache pollution, and reads perform very poorly.
Applications should only investigate changing the cache mode if writing to normally cached buffers is known to cause performance issues due to cache pollution, as write combined memory can have surprising performance pitfalls. Another approach is to use non-temporal stores to normally cached memory (STNP on ARMv8, mm_stream* on x86_64).
See also Apple’s documentation
Tuple Fields§
§0: NSUIntegerImplementations§
Source§impl MTLCPUCacheMode
impl MTLCPUCacheMode
pub const DefaultCache: Self
pub const WriteCombined: Self
Trait Implementations§
Source§impl Clone for MTLCPUCacheMode
impl Clone for MTLCPUCacheMode
Source§fn clone(&self) -> MTLCPUCacheMode
fn clone(&self) -> MTLCPUCacheMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MTLCPUCacheMode
impl Debug for MTLCPUCacheMode
Source§impl Encode for MTLCPUCacheMode
impl Encode for MTLCPUCacheMode
Source§impl Hash for MTLCPUCacheMode
impl Hash for MTLCPUCacheMode
Source§impl Ord for MTLCPUCacheMode
impl Ord for MTLCPUCacheMode
Source§fn cmp(&self, other: &MTLCPUCacheMode) -> Ordering
fn cmp(&self, other: &MTLCPUCacheMode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MTLCPUCacheMode
impl PartialEq for MTLCPUCacheMode
Source§impl PartialOrd for MTLCPUCacheMode
impl PartialOrd for MTLCPUCacheMode
Source§impl RefEncode for MTLCPUCacheMode
impl RefEncode for MTLCPUCacheMode
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
impl Copy for MTLCPUCacheMode
impl Eq for MTLCPUCacheMode
impl StructuralPartialEq for MTLCPUCacheMode
Auto Trait Implementations§
impl Freeze for MTLCPUCacheMode
impl RefUnwindSafe for MTLCPUCacheMode
impl Send for MTLCPUCacheMode
impl Sync for MTLCPUCacheMode
impl Unpin for MTLCPUCacheMode
impl UnwindSafe for MTLCPUCacheMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> EncodeArgument for Twhere
T: Encode,
impl<T> EncodeArgument for Twhere
T: Encode,
Source§const ENCODING_ARGUMENT: Encoding = T::ENCODING
const ENCODING_ARGUMENT: Encoding = T::ENCODING
The Objective-C type-encoding for this type.
Source§impl<T> EncodeReturn for Twhere
T: Encode,
impl<T> EncodeReturn for Twhere
T: Encode,
Source§const ENCODING_RETURN: Encoding = T::ENCODING
const ENCODING_RETURN: Encoding = T::ENCODING
The Objective-C type-encoding for this type.