copy inside scope
This commit is contained in:
@@ -258,9 +258,11 @@ fn training() {
|
||||
device.poll(wgpu::PollType::wait_indefinitely()).unwrap();
|
||||
receiver.recv().unwrap().unwrap();
|
||||
|
||||
// copy texture
|
||||
let view = buffer_slice.get_mapped_range();
|
||||
texture_data.extend_from_slice(&view[..]);
|
||||
// copy texture inside a scope so the mapped view gets dropped
|
||||
{
|
||||
let view = buffer_slice.get_mapped_range();
|
||||
texture_data.extend_from_slice(&view[..]);
|
||||
}
|
||||
output_staging_buffer.unmap();
|
||||
|
||||
// discombolulate stride
|
||||
|
||||
Reference in New Issue
Block a user