difftest: cleanup wgpu runner#587
Conversation
3b37201 to
08f6d09
Compare
603efd7 to
408a0bb
Compare
39dd493 to
376f532
Compare
408a0bb to
c0cb9e0
Compare
c0cb9e0 to
08ad9fd
Compare
… shader passthrough for rust-gpu
08ad9fd to
81640a0
Compare
81640a0 to
f1250b9
Compare
eddyb
left a comment
There was a problem hiding this comment.
LGTM modulo a few small things, anything else blocking this?
| let (sender, receiver) = futures::channel::oneshot::channel(); | ||
| buffer_slice.map_async(wgpu::MapMode::Read, move |res| { | ||
| let _ = sender.send(res); | ||
| }); | ||
| device.poll(wgpu::PollType::wait_indefinitely())?; | ||
| block_on(receiver) | ||
| .context("mapping canceled")? | ||
| .context("mapping failed")?; |
There was a problem hiding this comment.
Does the wgpu example runner do it this way? Or does it just unwrap the Result in the closure passed to map_async?
There was a problem hiding this comment.
It actually does, that said, I'm not a huge fan of the download code AI wrote so let me refactor it a little. encoder.map_buffer_on_submit() is way cleaner as a map_async() replacement.
Also noticed it was only ever writing out the first writable buffer, if you had two the second one would just be ignored... I'll just append all the buffers. But I also don't want to spend too much time on this and rather completely refactor the difftest framework yet again, will propose my idea on zulip today.
Extracted from #334