Skip to content

Bevy 0.19 VRAM usage regression on Vulkan #24722

Description

@DGriffin91

Bevy 0.19

System: 7950x, 128GB ram, 4070ti, 16GB vram.

If I run bistro or sponza using the Vulkan backend (on both linux and windows) I OOM:
ERROR bevy_render::error_handler: Caught rendering error: Out of Memory

This doesn't appear to be an issue with the Metal or DX12 backends. 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 system RAM as expected. This was also the behavior with the Vulkan backend in Bevy 0.18

Tried bisecting, ran into different issues/crashes at different times. I believe the issue started when Bevy updated to wgpu 28 and the issue persists with wgpu 29.

@JMS55 Started work on a wgpu PR to try to resolve the issue: gfx-rs/wgpu#9462

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
  • 5/6: 4bd3708 crashes with wgpu error: Out of Memory

Previously in the 0.19 dev cycle, the oom would result in cause flashing, this was resolved. This older issue addressed both the flashing and the oom: #23183

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorC-PerformanceA change motivated by improving speed, memory usage or compile timesD-ComplexQuite challenging from either a design or technical perspective. Ask for help!O-VulkanSpecific to the Vulkan render APIP-RegressionFunctionality that used to work but no longer does. Add a test for this!S-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Needs SME Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions