Skip to content

Assert failed in Dx12 backend during queue_write_buffer #1319

Closed
@Imberflur

Description

@Imberflur

Description
I received a report that an assert failed during this call.

Repro steps
checkout imbris/wgpu-master-rebased from https://gitlab.com/veloren/veloren and run in Dx12 backend (WGPU_BACKEND=Dx12) (I have not reproduced this myself. I suspect it is specific to the GPU/driver)

Expected vs observed behavior
no panic vs panic

Extra materials

  • Panic:
PanicInfo: panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `-2005270523`', C:\Users\D\.cargo\git\checkouts\gfx-e86e7f3ebdbc4218\2a93d52\src\backend\dx12\src\device.rs:2438:9

I think this corresponds to 0x887A0005 or DXGI_ERROR_DEVICE_REMOVED
the call to CreatePlacedResource appears to fail: https://github.com/gfx-rs/gfx/blob/2a93d52661aafcbd6441ea83e739c8ced906cd21/src/backend/dx12/src/device.rs#L2440

  • Backtrace:
  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

Platform
Windows 10, gfx-hal: 2a93d52, wgpu-rs: 1de388a
GPU and feature warning:

INFO wgpu_core::instance: Adapter Dx12 AdapterInfo { name: "Intel(R) HD Graphics 4600", vendor: 32902, device: 1042, device_type: IntegratedGpu }
Apr 10 13:45:24.591  WARN wgpu_core::instance: Missing internal features: INDEPENDENT_BLENDING | VERTEX_STORES_AND_ATOMICS | FRAGMENT_STORES_AND_ATOMICS

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend: dx12Issues with DX12 or DXGIexternal: driver-bugA driver is causing the bug, though we may still want to work around it

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions