You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description Documentation for Surface::configure says it will panic if an old SurfaceTexture is still alive, but does not mention TextureView etc. It seems like TextureView referencing old surface also causes panic when resizing surface with Dx12 backend.
Repro steps
Retaining old TextureView returned by SurfaceTexture.texture.create_view() across Surface::configure with Dx12 backend. (It did not reproduce with Vulkan backend on the other hand)
Expected vs observed behavior Surface::configure should be clarified to panic in this case, or it should not panic. (per bevyengine/bevy#15087 (comment))
Extra materials
These errors are logged when Surface::configure is called under such condition.
2024-09-07T09:31:15.876281Z ERROR wgpu_hal::dx12: ResizeBuffers failed: 0x887A0001
2024-09-07T09:31:15.876492Z ERROR wgpu_core::device::global: surface configuration failed: window is in use
thread 'Compute Task Pool (2)' panicked at E:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-22.1.0\src\backend\wgpu_core.rs:786:18:
Error in Surface::configure: Validation Error
Caused by:
Invalid surface
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library\std\src\panicking.rs:665
1: core::panicking::panic_fmt
at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library\core\src\panicking.rs:74
2: wgpu::backend::wgpu_core::ContextWgpuCore::handle_error_fatal<enum2$<wgpu_core::present::ConfigureSurfaceError> >
at E:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-22.1.0\src\backend\wgpu_core.rs:317
3: wgpu::backend::wgpu_core::impl$7::surface_configure
at E:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-22.1.0\src\backend\wgpu_core.rs:786
4: wgpu::context::impl$5::surface_configure<wgpu::backend::wgpu_core::ContextWgpuCore>
at E:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-22.1.0\src\context.rs:2169
5: wgpu::Surface::configure
at E:\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-22.1.0\src\lib.rs:5658
6: bevy_render::renderer::render_device::RenderDevice::configure_surface
at .\crates\bevy_render\src\renderer\render_device.rs:197
...
Platform
Information about your OS, version of wgpu, your tech stack, etc.
Description
Documentation for
Surface::configure
says it will panic if an old SurfaceTexture is still alive, but does not mentionTextureView
etc. It seems likeTextureView
referencing old surface also causes panic when resizing surface with Dx12 backend.Repro steps
Retaining old
TextureView
returned bySurfaceTexture.texture.create_view()
acrossSurface::configure
with Dx12 backend. (It did not reproduce with Vulkan backend on the other hand)Expected vs observed behavior
Surface::configure
should be clarified to panic in this case, or it should not panic. (per bevyengine/bevy#15087 (comment))Extra materials
These errors are logged when
Surface::configure
is called under such condition.Platform
Information about your OS, version of
wgpu
, your tech stack, etc.AdapterInfo { name: "NVIDIA GeForce RTX 3060 Ti", vendor: 4318, device: 9353, device_type: DiscreteGpu, driver: "32.0.15.5599", driver_info: "", backend: Dx12 }
wgpu 22.1.0
Using wgpu via bevy.
The text was updated successfully, but these errors were encountered: