-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Bevy main 2494a37
About half the scene flashes in and out of existence every other frame.
This appears to only happen on the vulkan backend (on both linux and windows). If I set WGPU_BACKEND=dx12 on windows I am able to open multiple instances of bistro without issues, and can see that I am spilling into RAM.
On vulkan the issue seems to appear around the time I run out of VRAM. When loading, it usually (but not always) hits 16GB, starts flashing, with the VRAM usage settling down to 11GB. Every once in a while (rarely), the usage never hits 16GB and the scene loads correctly on main.
If --no-mip-generation is set, flashing doesn't occur on my pc. But if I open 3 instances of bistro at the same time, flashing still occurs. On the commit before bevy updated to wgpu 0.28 I am able to simultaneously open 3 instances of bistro with mip generation and no compression and after taking a while the scenes seem to all load correctly with no flashing.
Tried bisecting, ran into different issues/crashes at different times. There may be UB, system ordering ambiguity, or race conditions involved, as the crashing doesn't seem to be 100% consistent.
Timelime
Before 543b305 the scene loads as expected. Each of these are the first commit that the behavior changes:
- 1/22: 543b305 crashes with
Trying to destroy a SwapchainAcquireSemaphore that is still in use by a SurfaceTexture - 1/25: d734e7f crashes with
wgpu error: Out of Memory - 2/5: 71dd9ea doesn't crash but scene is flashing
Tested on Linux & Windows, RTX4070ti (16GB), 7950x with bistro example in large_scenes
Tried wgpu 28.0.1, it had the same flashing issue.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status