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

Implement Queue::write_buffer_with #2777

Merged
merged 4 commits into from Jun 28, 2022

Conversation

teoxoy
Copy link
Member

@teoxoy teoxoy commented Jun 15, 2022

Connections
closes #1670

Description
The new Queue::write_buffer_with method allows users to write their data directly in a staging buffer; avoiding an extra copy in more complex projects where you'd have to first write the content to a temporary Vec and then pass it to Queue::write_buffer.

Testing
I converted a few examples locally to test the new method.
Let me know if I should push some of them.

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

This is damn good, I really don't have many concerns about it at all besides the small things I mentioned

wgpu/src/lib.rs Outdated Show resolved Hide resolved
wgpu-core/src/device/queue.rs Show resolved Hide resolved
@teoxoy teoxoy requested a review from cwfitzgerald June 23, 2022 12:12
wgpu-core/src/device/queue.rs Outdated Show resolved Hide resolved
wgpu/src/lib.rs Show resolved Hide resolved
@cwfitzgerald cwfitzgerald enabled auto-merge (squash) June 28, 2022 18:22
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Thanks for taking this on!

@cwfitzgerald cwfitzgerald merged commit 5eb09f6 into gfx-rs:master Jun 28, 2022
@teoxoy teoxoy deleted the write_buffer_with branch December 5, 2022 18:21
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.

Queue::write_buffer_with
3 participants