Warn when binding a buffer that is still mapped

This commit is contained in:
Almar Klein
2020-04-16 11:35:03 +02:00
committed by Dzmitry Malyshau
parent 88710e899d
commit 754b465818

View File

@@ -1466,6 +1466,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
}
if !buffer_guard[id].life_guard.use_at(submit_index) {
if let resource::BufferMapState::Active = buffer_guard[id].map_state {
log::warn!("Dropped buffer has a pending mapping.");
unmap_buffer(&device.raw, &mut buffer_guard[id]);
}
device.temp_suspected.buffers.push(id);