// Copyright 2016 GFX developers // // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // http://opensource.org/licenses/MIT>, at your option. This file may not be // copied, modified, or distributed except according to those terms.
const StorageModeShared = (MTLStorageMode::Shared as NSUInteger) << MTLResourceStorageModeShift; const StorageModeManaged = (MTLStorageMode::Managed as NSUInteger) << MTLResourceStorageModeShift; const StorageModePrivate = (MTLStorageMode::Private as NSUInteger) << MTLResourceStorageModeShift; const StorageModeMemoryless = (MTLStorageMode::Memoryless as NSUInteger) << MTLResourceStorageModeShift;
/// Only available on macos(10.13), ios(10.0) const HazardTrackingModeDefault = (MTLHazardTrackingMode::Default as NSUInteger) << MTLResourceHazardTrackingModeShift; /// Only available on macos(10.13), ios(10.0) const HazardTrackingModeUntracked = (MTLHazardTrackingMode::Untracked as NSUInteger) << MTLResourceHazardTrackingModeShift; /// Only available on macos(10.15), ios(13.0) const HazardTrackingModeTracked = (MTLHazardTrackingMode::Tracked as NSUInteger) << MTLResourceHazardTrackingModeShift;
}
}
bitflags::bitflags! { /// Options that describe how a graphics or compute function uses an argument buffer’s resource. /// /// Enabling certain options for certain resources determines whether the Metal driver should /// convert the resource to another format (for example, whether to decompress a color render target). /// /// See <https://developer.apple.com/documentation/metal/mtlresourceusage> #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] pubstruct MTLResourceUsage: NSUInteger { /// An option that enables reading from the resource. const Read = 1 << 0; /// An option that enables writing to the resource. const Write = 1 << 1; /// An option that enables sampling from the resource. /// /// Specify this option only if the resource is a texture. const Sample = 1 << 2;
}
}
/// Only available on macOS 10.13+ & iOS 10.11+ pubfn allocated_size(&self) -> NSUInteger { unsafe { msg_send![self, allocatedSize] }
}
/// Only available on macos(10.15), ios(13.0) pubfn hazard_tracking_mode(&self) -> MTLHazardTrackingMode { unsafe { msg_send![self, hazardTrackingMode] }
}
/// Only available on macos(10.15), ios(13.0) pubfn resource_options(&self) -> MTLResourceOptions { unsafe { msg_send![self, resourceOptions] }
}
/// Only available on macos(10.13), ios(10.0) pubfn heap(&self) -> &HeapRef { unsafe { msg_send![self, heap] }
}
/// Only available on macos(10.15), ios(13.0) pubfn heap_offset(&self) -> NSUInteger { unsafe { msg_send![self, heapOffset] }
}
/// Only available on macos(10.13), ios(10.0) pubfn make_aliasable(&self) { unsafe { msg_send![self, makeAliasable] }
}
/// Only available on macos(10.13), ios(10.0) pubfn is_aliasable(&self) -> bool { unsafe { msg_send_bool![self, isAliasable] }
}
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.28Bemerkung:
(vorverarbeitet am 2026-06-18)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.