Only request required part of feedback buffer rather than full range
This commit is contained in:
parent
b163fa0177
commit
b2b4942a59
|
@ -159,7 +159,8 @@ impl BrickmapManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the position data
|
// Get the position data
|
||||||
slice = self.feedback_result_buffer.slice(16..);
|
let range_end = 16 + 16 * request_count as u64;
|
||||||
|
slice = self.feedback_result_buffer.slice(16..range_end);
|
||||||
slice.map_async(wgpu::MapMode::Read, |_| {});
|
slice.map_async(wgpu::MapMode::Read, |_| {});
|
||||||
context.device.poll(wgpu::Maintain::Wait);
|
context.device.poll(wgpu::Maintain::Wait);
|
||||||
data = bytemuck::cast_slice(slice.get_mapped_range().as_ref()).to_vec();
|
data = bytemuck::cast_slice(slice.get_mapped_range().as_ref()).to_vec();
|
||||||
|
|
Loading…
Reference in New Issue