Skip to content

Commit

Permalink
Merge #76
Browse files Browse the repository at this point in the history
76: Expose missing MTLDevice::is_removable r=kvark a=repi

Ran into that this field for detecting eGPUs wasn't exposed, which is a simple add.

Co-authored-by: Johan Andersson <repi@repi.se>
  • Loading branch information
bors[bot] and repi committed Dec 27, 2018
2 parents d7e47ae + efc71a7 commit ce53349
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 ce53349

Please sign in to comment.