Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DeviceRef::new_texture_with_descriptor_and_iosurface #331

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fabiosky
Copy link

@fabiosky fabiosky commented Jul 16, 2024

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
Copy link
Contributor

MarijnS95 commented Jul 21, 2024

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 fabiosky changed the title Add Texture from IOSurface Add DeviceRef::new_texture_with_descriptor_and_iosurface Jul 26, 2024
@fabiosky fabiosky changed the title Add DeviceRef::new_texture_with_descriptor_and_iosurface Add DeviceRef::new_texture_with_descriptor_and_iosurface Jul 26, 2024
@fabiosky
Copy link
Author

Renamed commit message and PR title/message.

src/device.rs Outdated Show resolved Hide resolved
@@ -35,6 +35,7 @@ block = "0.1.6"
foreign-types = "0.5"
dispatch = { version = "0.2", optional = true }
paste = "1"
io-surface = { git = "https://github.com/servo/core-foundation-rs" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not that this is a rather confusing dependency. Ideally, it matches the crate name

@kvark
Copy link
Member

kvark commented Nov 24, 2024

Also, ideally IOSurface is included in core-foundation-types...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants