diff --git a/src/device.rs b/src/device.rs index dcd8676a..12f6d41c 100644 --- a/src/device.rs +++ b/src/device.rs @@ -1380,6 +1380,10 @@ type MTLNewRenderPipelineStateWithReflectionCompletionHandler = extern fn(render type MTLNewComputePipelineStateCompletionHandler = extern fn(computePipelineState: id, error: id); type MTLNewComputePipelineStateWithReflectionCompletionHandler = extern fn(computePipelineState: id, reflection: id, error: id);*/ +#[derive(Debug, Copy, Clone)] +pub enum _IOSurface { } +pub type IOSurfaceRef = *mut _IOSurface; + pub enum MTLDevice {} foreign_obj_type! { @@ -1665,6 +1669,14 @@ impl DeviceRef { pub fn new_texture(&self, descriptor: &TextureDescriptorRef) -> Texture { unsafe { msg_send![self, newTextureWithDescriptor: descriptor] } } + + pub fn new_texture_with_surface_plane(&self, descriptor: &TextureDescriptorRef, iosurface: IOSurfaceRef, plane: NSUInteger) -> Texture { + unsafe { + msg_send![self, newTextureWithDescriptor: descriptor + iosurface: iosurface + plane: plane] + } + } pub fn new_sampler(&self, descriptor: &SamplerDescriptorRef) -> SamplerState { unsafe { msg_send![self, newSamplerStateWithDescriptor: descriptor] }