Skip to content

Commit

Permalink
Expose missing MTLDevice::is_removable
Browse files Browse the repository at this point in the history
  • Loading branch information
repi committed Dec 27, 2018
1 parent d7e47ae commit efc71a7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,16 @@ impl DeviceRef {
}
}

pub fn is_removable(&self) -> bool {
unsafe {
match msg_send![self, isRemovable] {
YES => true,
NO => false,
_ => unreachable!()
}
}
}

pub fn supports_feature_set(&self, feature: MTLFeatureSet) -> bool {
unsafe {
match msg_send![self, supportsFeatureSet:feature] {
Expand Down

0 comments on commit efc71a7

Please sign in to comment.