1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use crate::Metal; #[cfg(feature = "Metal_MTLDevice")] impl Metal::MTLDevice { // pub fn system_default() -> Option<Self> { // MTLCreateSystemDefaultDevice() // } // // pub fn all() -> Id<NSArray<Self>> { // #[cfg(target_os = "macos")] // MTLCopyAllDevices() // #[cfg(not(target_os = "macos"))] // NSArray::from(MTLCreateSystemDefaultDevice()) // } }