// 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;
}
}
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.