Open recatek opened 1 year ago
Got similar issue that is mentioned in code comment: https://github.com/bevyengine/bevy/blob/main/crates/bevy_render/src/view/window/mod.rs#L199
get_next_texture
hangs on Device::wait
.
In my case during very heavy GPU workload (multiple ingame screens rendering full game content) get_next_texture hangs in every frame. I am using custom rendering pipelines, shaders so that could be an issue too. But wanted to provide additional information about observed behaviour.
Bevy version
10.1
Relevant system information
What you did
Ran this code with Chrome or some other task in the background, creating periods of higher background CPU usage.
What went wrong
At higher CPU loads, bevy will get stuck in long hitches -- tracy shows this hang occurring in window::prepare_window.
Additional information
This seems like there's some sort of thread contention issue. There's an element of "well, duh" to this where certainly performance will degrade as CPU usage rises, but this is a pretty drastic hitch rather than a gradual framerate drop. I haven't observed behavior like this in other engines, so I'm wondering if there's some trick here to avoiding this issue and presenting a smoother experience without such a frame time contrast?