panic! when Instance is destroyed #4604
Labels
api: dx12
Issues with DX12 or DXGI
help required
We need community help to make this happen.
type: bug
Something isn't working
Description
When an Instance is created with flags set to wgpu::InstanceFlags::DEBUG or wgpu::InstanceFlags::DISCARD_HAL_LABELS and later goes out of scope and rust is running in Debug mode it panics with the message:
thread 'main' panicked at 'attempt to subtract with overflow', C:\Users\rasmu.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\wgpu-hal-0.18.0\src\auxil\dxgi\exception.rs:34:5
It does not panic with the flag wgpu::InstanceFlags::VALIDATION
If a Surface is created using the Instance it does not panic until the surface is destroyed.
Repro steps
Ideally, a runnable example we can check out.
Expected vs observed behavior
Platform
OS: Windows 11
System Type: x64-based PC
Processor: AMD Ryzen 5 4500U with Radeon Graphics, 2375 Mhz, 6 Core(s), 6 Logical Processor(s)
GPU: AMD Radeon(TM) Graphics
wgpu version 0.18.0
The text was updated successfully, but these errors were encountered: