mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-10-30 05:51:42 +00:00
[d3d12] Avoid panic on instance drop (#5134)
This commit is contained in:
parent
6440af03a6
commit
b3490de69d
@ -71,6 +71,9 @@ Bottom level categories:
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
#### General
|
||||
- Fix `panic!` when dropping `Instance` without `InstanceFlags::VALIDATION`. By @hakolao in [#5134](https://github.com/gfx-rs/wgpu/pull/5134)
|
||||
|
||||
#### WGL
|
||||
|
||||
- In Surface::configure and Surface::present, fix the current GL context not being unset when releasing the lock that guards access to making the context current. This was causing other threads to panic when trying to make the context current. By @Imberflur in [#5087](https://github.com/gfx-rs/wgpu/pull/5087).
|
||||
|
@ -7,9 +7,11 @@ use std::{mem, sync::Arc};
|
||||
|
||||
impl Drop for super::Instance {
|
||||
fn drop(&mut self) {
|
||||
if self.flags.contains(wgt::InstanceFlags::VALIDATION) {
|
||||
crate::auxil::dxgi::exception::unregister_exception_handler();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl crate::Instance<super::Api> for super::Instance {
|
||||
unsafe fn init(desc: &crate::InstanceDescriptor) -> Result<Self, crate::InstanceError> {
|
||||
|
Loading…
Reference in New Issue
Block a user