Skip to content

Update dependencies to latest/stable versions #1

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

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

Conversation

aneeshdurg
Copy link

No description provided.

@@ -118,16 +126,19 @@ async fn run_collatz_shader(input: &[u8]) -> Result<Vec<u32>, BufferAsyncError>

queue.submit(Some(encoder.finish()));
let buffer_slice = readback_buffer.slice(..);
let buffer_future = buffer_slice.map_async(wgpu::MapMode::Read);
let (resolver, waiter) = oneshot::channel();
buffer_slice.map_async(wgpu::MapMode::Read, move |res| {
Copy link
Author

Choose a reason for hiding this comment

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

I'm still learning about rust's async apis, so I'm not sure if this was the best way to express this. wgpu::Buffer::map_async has changed and no longer returns a future, but takes a callback to run instead. I'm using oneshot::channel to get a Future that will resolve only after the callback is invoked.

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.

1 participant