Lines Matching full:features
13 macro_rules! features { macro
24 /// Represents all the features that are available on a physical device or enabled on
33 /// use vulkano::device::Features;
35 /// let minimal_features = Features {
37 /// .. Features::none()
40 /// let optimal_features = vulkano::device::Features {
43 /// .. Features::none()
56 pub struct Features {
63 impl Features { impl
64 … /// Checks enabled features against the device version, device extensions and each other.
67 supported: &Features,
71 ) -> Result<(), crate::device::features::FeatureRestrictionError> {
75 return Err(crate::device::features::FeatureRestrictionError {
77 … restriction: crate::device::features::FeatureRestriction::NotSupported,
83 return Err(crate::device::features::FeatureRestrictionError {
85 …restriction: crate::device::features::FeatureRestriction::RequiresFeature(stringify!($requires_fea…
92 return Err(crate::device::features::FeatureRestrictionError {
94 …restriction: crate::device::features::FeatureRestriction::ConflictsFeature(stringify!($conflicts_f…
101 return Err(crate::device::features::FeatureRestrictionError {
103 …restriction: crate::device::features::FeatureRestriction::RequiredByExtension(stringify!($required…
112 /// Builds a `Features` object with all values to false.
113 pub const fn none() -> Features {
114 Features {
119 /// Builds a `Features` object with all values to true.
123 pub const fn all() -> Features {
124 Features {
133 pub fn is_superset_of(&self, other: &Features) -> bool {
137 /// Builds a `Features` that is the intersection of `self` and another `Features`
141 pub fn intersection(&self, other: &Features) -> Features {
142 Features {
147 /// Builds a `Features` that is the difference of another `Features` object from `self`.
150 pub fn difference(&self, other: &Features) -> Features {
151 Features {
158 pub(crate) fn write(&mut self, features: &Features) {
162 ]).flatten().next().map(|f| *f = features.$member as ash::vk::Bool32);
167 impl From<&FeaturesFfi> for Features {
169 Features {
181 pub use crate::autogen::Features;
182 pub(crate) use features;