Warn when binding a buffer that is still mapped

This commit is contained in:
Almar Klein 2020-04-16 11:35:03 +02:00
parent 6b0751f1f8
commit e7005548c0

View File

@ -1461,6 +1461,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);