mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-29 02:03:35 +00:00
don't panic on mapped buffer in queue_submit (#3364)
This commit is contained in:
parent
fac4731288
commit
f40611fd5c
@ -182,6 +182,7 @@ Additionally `Surface::get_default_config` now returns an Option and returns Non
|
||||
- Improve error messages when binding bind group with dynamic offsets. By @cwfitzgerald in [#3294](https://github.com/gfx-rs/wgpu/pull/3294)
|
||||
- Allow non-filtering sampling of integer textures. By @JMS55 in [#3362](https://github.com/gfx-rs/wgpu/pull/3362).
|
||||
- Validate texture ids in `Global::queue_texture_write`. By @jimblandy in [#3378](https://github.com/gfx-rs/wgpu/pull/3378).
|
||||
- Don't panic on mapped buffer in queue_submit. By @crowlKats in [#3364](https://github.com/gfx-rs/wgpu/pull/3364).
|
||||
|
||||
#### Metal
|
||||
- Fix texture view creation with full-resource views when using an explicit `mip_level_count` or `array_layer_count`. By @cwfitzgerald in [#3323](https://github.com/gfx-rs/wgpu/pull/3323)
|
||||
|
@ -307,6 +307,8 @@ pub enum QueueSubmitError {
|
||||
DestroyedTexture(id::TextureId),
|
||||
#[error(transparent)]
|
||||
Unmap(#[from] BufferAccessError),
|
||||
#[error("Buffer {0:?} is still mapped")]
|
||||
BufferStillMapped(id::BufferId),
|
||||
#[error("surface output was dropped before the command buffer got submitted")]
|
||||
SurfaceOutputDropped,
|
||||
#[error("surface was unconfigured before the command buffer got submitted")]
|
||||
@ -910,7 +912,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
} else {
|
||||
match buffer.map_state {
|
||||
BufferMapState::Idle => (),
|
||||
_ => panic!("Buffer {:?} is still mapped", id),
|
||||
_ => return Err(QueueSubmitError::BufferStillMapped(id.0)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user