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
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
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
Thank you for filing! Please provide an API trace.
error in visual studio
D3D12: Removing Device.
D3D12 ERROR: ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DEVICE_HUNG: The Device took an unreasonable amount of time to execute its commands, or the hardware crashed/hung. As a result, the TDR (Timeout Detection and Recovery) mechanism has been triggered. The current Device Context was executing commands when the hang occurred. The application may want to respawn and fallback to less aggressive use of the display hardware). [ EXECUTION ERROR #232: DEVICE_REMOVAL_PROCESS_AT_FAULT]
Exception thrown at 0x00007FFB19F4D759 in veloren-voxygen.exe: Microsoft C++ exception: _com_error at memory location 0x0000009AF977D3B0.
Exception thrown at 0x00007FFB19F4D759 in veloren-voxygen.exe: Microsoft C++ exception: _com_error at memory location 0x0000009AF977D728.
Exception thrown at 0x00007FFB19F4D759 in veloren-voxygen.exe: Microsoft C++ exception: _com_error at memory location 0x0000009AF977E510.
Exception thrown at 0x00007FFB19F4D759 in veloren-voxygen.exe: Microsoft C++ exception: _com_error at memory location 0x0000009AF977E990.
(api trace may be available soon)
Another way you could help is running this from Visual Studio and seeing what the validation layer thinks about this error.
Edit: ah, ok, nothing interesting by the validation then

Edit: ah, ok, nothing interesting by the validation then
So this error message from VS doesn't really give us any useful information?
That's an unfortunate thing. The error basically means a GPU crash, the conditions for which weren't caught by DX runtime validation. Note that this is DX11.1 class hardware, and it's always been a little tricky. We fully intent to ship on it though, so we want this solved.
I'll try to see if we can submit a bug somewhere for Intel or Microsoft to have a look.
(fwiw, the trace works fine on a modern GPU)
Could you please use the helper tool to get information about the system/driver versions? I'm going to submit a bug there, unless you want to.
Note: we'd want to provide a repro case based on the API trace, not the whole veloren.

@kvark
Thank you! Filed as https://github.com/IGCIT/Intel-GPU-Community-Issue-Tracker-IGCIT/issues/44