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 newTextureWithDescriptor:iosurface:plane: #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Michael-Lfx
Copy link
Contributor

No description provided.

Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

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

@grovesNL could you have a look as well?

@@ -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 { }
Copy link
Member

Choose a reason for hiding this comment

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

We should probably declare it as a full-featured foreign_obj_type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok.

@@ -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 {
Copy link
Member

Choose a reason for hiding this comment

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

like with other ref arguments, we should use &IOSurfaceRef
I suppose this is directly related to making IOSurface to be a real foreign type

Copy link
Collaborator

Choose a reason for hiding this comment

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

@xiaopengli89
Copy link
Contributor

xiaopengli89 commented Dec 2, 2021

How is this PR going? If we want to use core-foundation, I can open a new PR.

@kvark
Copy link
Member

kvark commented Dec 2, 2021

We don't want to use core-foundation, only 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.

4 participants