Skip to content

Window resize crashes on DX12 software renderer in 0.18.0-rc.1 (regression from 0.17.3) #22225

@natepiano

Description

@natepiano

Bevy version and features

0.18.0-rc.1 (works in 0.17.3)

Relevant system information

  • Windows 11 VM (Hyper-V)
  • Microsoft Basic Render Driver (DX12 software renderer)
  • wgpu 27.0.1

Rendering related - AdapterInfo

AdapterInfo { name: "Microsoft Basic Render Driver", vendor: 5140, device: 140, device_type: Cpu, driver: "10.0.26100.7309", driver_info: "", backend: Dx12 }

What you did

Minimal app with just DefaultPlugins:

  use bevy::prelude::*;

  fn main() {
      App::new().add_plugins(DefaultPlugins).run();
  }

Launch the app, then resize the window.

What went wrong

App crashes immediately on resize with:

  ERROR wgpu_hal::dx12: ResizeBuffers failed: The application made a call that is invalid. (0x887A0001)
  ERROR wgpu_core::device::global: surface configuration failed: window is in use

  thread 'Compute Task Pool (2)' panicked at wgpu-27.0.1/src/backend/wgpu_core.rs:3793:18:
  wgpu error: Validation Error
  Caused by:
    In Surface::configure
      Invalid surface

Additional information

  • No Vulkan driver available in VM, wgpu falls back to DX12 software renderer
  • App launches and renders fine, crash only occurs on resize
  • Same code works without issue on bevy 0.17.3
  • This appears similar to DX12 backend panics when window is resized #15077 which was fixed by clearing ViewTargetAttachments before resize - possibly a regression or variant of that issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorO-DX12Specific to the DX12 render APIP-CriticalThis must be fixed immediately or contributors or users will be severely impactedS-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions