-
Notifications
You must be signed in to change notification settings - Fork 898
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
Implicitly add COPY_DST
when using create_texture_with_data
#1622
Conversation
Hmmm. I wonder if we should just take the descriptor by value if we're just going to clone it anyway. |
But that would be a breaking change, and it would go against the current wgpu convention, wouldn't it? I don't think there's any other place where a descriptor is passed by value? |
Wouldn't it be possible to only copy the descriptor? like |
@HalfVoxel it would be a breaking change, but we don't really mind that here. There isn't, which is what makes this a hard call. @kvark I hearby summon thee. @kocsis1david it's not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I simplified the code to always do the clone. However, I left the parameter as a reference to keep the api following the wgpu conventions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
…rs#1622) * Implicitly add `COPY_DST` when using `create_texture_with_data` * Always clone texture descriptor
Connections
Fixes: #1621
Description
It feels kinda ugly to have to clone the descriptor. It's not a big deal performance-wise, but still.
An alternative to this would be a nicer validation error message.