gfx-rs / metal-rs

Rust bindings for Metal
Apache License 2.0
567 stars 112 forks source link

Add DeviceRef::new_texture_with_descriptor_and_iosurface #331

Open fabiosky opened 1 month ago

fabiosky commented 1 month ago

Add DeviceRef::new_texture_with_descriptor_and_iosurface

IOSurfaceRef is already defined in: https://github.com/servo/core-foundation-rs/tree/main/io-surface

So importing as dependency.

MarijnS95 commented 1 month ago

The comment and link in your description are wrong, those are already there. In this PR you're adding:

https://developer.apple.com/documentation/metal/mtldevice/1433378-newtexturewithdescriptor

with signature:

- (id<MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor *)descriptor 
                                 iosurface:(IOSurfaceRef)iosurface 
                                     plane:(NSUInteger)plane;`

And the title should describe that you're adding the constructor, not the texture itself.

fabiosky commented 1 month ago

Renamed commit message and PR title/message.