Skip to content

Unexpected "DeviceRemoved" on CreatePlacedResource() #44

@kvark

Description

@kvark

Emulator [Required]

Original issue - gfx-rs/wgpu#1319 - is happening with wgpu.


CPU/GPU [Required]

Intel i5-4570
Intel HD Graphics 4600


GPU Driver Version [Required]

20.19.15.5171


Rendering API [Required]

DirectX 12


Description [Required]

At some conditions, creating a placed resource with CreatePlacedResource causes a TDR ("DeviceRemoved").
No DX runtime warnings are issued. The same program works correctly on other hardware.


Steps To Reproduce [Required]

wgpu-dx12-trace.zip

  1. Unpack the ZIP into folder "TraceFolder"
  2. Install Rust and Cargo (e.g. via https://rustup.rs/)
  3. git clone https://github.com/gfx-rs/wgpu
  4. cd wgpu/player
  5. git checkout 27dbf076d5e257e14c816b052fcfdb25c165eda3
  6. cargo run --features winit -- "TraceFolder"/wgpu-dx12-trace

Sample code / Affected code [Optional]

https://github.com/gfx-rs/gfx/blob/2a93d52661aafcbd6441ea83e739c8ced906cd21/src/backend/dx12/src/device.rs#L2440


Executable to reproduce the bug [Optional]

I'm happy to provide a build, if needed.


Notes [Optional]

The device is DX11.1 class HW running DX12, which has been tricky to get working so far.

Call stack:

12: core::panicking::assert_failed_inner
             at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464\/library\core\src\panicking.rs:160
  13: core::panicking::assert_failed<i32,i32>
             at C:\Users\D\.rustup\toolchains\nightly-2021-03-22-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\panicking.rs:117
  14: gfx_backend_dx12::device::{{impl}}::bind_buffer_memory
             at C:\Users\D\.cargo\git\checkouts\gfx-e86e7f3ebdbc4218\2a93d52\src\backend\dx12\src\device.rs:2438
  15: wgpu_core::device::alloc::MemoryBlock<gfx_backend_dx12::Backend>::bind_buffer
             at C:\Users\D\.cargo\git\checkouts\wgpu-53e70f8674b08dd4\e430cf4\wgpu-core\src\device\alloc.rs:98
  16: wgpu_core::device::Device<gfx_backend_dx12::Backend>::prepare_stage<gfx_backend_dx12::Backend>
             at C:\Users\D\.cargo\git\checkouts\wgpu-53e70f8674b08dd4\e430cf4\wgpu-core\src\device\queue.rs:135
  17: wgpu_core::hub::Global<wgpu_core::hub::IdentityManagerFactory>::queue_write_buffer<wgpu_core::hub::IdentityManagerFactory,gfx_backend_dx12::Backend>  
             at C:\Users\D\.cargo\git\checkouts\wgpu-53e70f8674b08dd4\e430cf4\wgpu-core\src\device\queue.rs:223
  18: wgpu::backend::direct::{{impl}}::queue_write_buffer
             at C:\Users\D\.cargo\git\checkouts\wgpu-rs-40ea39809c03c5d8\1de388a\src\backend\direct.rs:1831
  19: wgpu::Queue::write_buffer
             at C:\Users\D\.cargo\git\checkouts\wgpu-rs-40ea39809c03c5d8\1de388a\src\lib.rs:2839
  20: veloren_voxygen::render::buffer::DynamicBuffer<veloren_voxygen::render::pipelines::ui::Vertex>::update
             at voxygen\src\render\buffer.rs:49
  21: veloren_voxygen::render::model::DynamicModel<veloren_voxygen::render::pipelines::ui::Vertex>::update
             at voxygen\src\render\model.rs:71
  22: veloren_voxygen::render::renderer::Renderer::update_model
             at voxygen\src\render\renderer.rs:1083

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions