opened
Herschel
username_0
Running the quad or colour-uniform example:
`cargo run --bin quad --features dx12`
results in the following panic:
```
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `-2005270523`: error on command allocator creation: 887a0005', src\backend\dx12\src\pool.rs:29:17
```

Stack trace and more spew:
```AdapterInfo { name: "NVIDIA GeForce RTX 2080 Ti", vendor: 4318, device: 7687, device_type: DiscreteGpu }
AdapterInfo { name: "Microsoft Basic Render Driver", vendor: 5140, device: 140, device_type: VirtualGpu }
AdapterInfo { name: "NVIDIA GeForce RTX 2080 Ti", vendor: 4318, device: 7687, device_type: DiscreteGpu }
Memory types: [MemoryType { properties: DEVICE_LOCAL, heap_index: 0 }, MemoryType { properties: CPU_VISIBLE | COHERENT, heap_index: 1 }, MemoryType { properties: CPU_VISIBLE | COHERENT | CPU_CACHED, heap_index: 1 }]
formats: Some([Bgra8Srgb, Bgra8Unorm, Rgba8Srgb, Rgba8Unorm, A2b10g10r10Unorm, Rgba16Sfloat])
SwapchainConfig { present_mode: FIFO, composite_alpha_mode: OPAQUE, format: Bgra8Srgb, extent: Extent2D { width: 1024, height: 768 }, image_count: 3, image_layers: 1, image_usage: COLOR_ATTACHMENT }
Loaded 'C:\Windows\System32\dxilconv.dll'.
D3D12 WARNING: ID3D12CommandList::IASetVertexBuffers: Resource 0x00000209A84AE870:'Unnamed ID3D12Resource Object' and 1 other resources contain the GPU Virtual Address range [0x000000000a9fa000, 0x000000000a9fa05f] on a Heap (0x000002099FF82AD0:'Unnamed ID3D12Heap Object').  This may be OK as long as all of these resources are in the same state however developer probably did not intend to make use of this behavior. [ STATE_CREATION WARNING #926: HEAP_ADDRESS_RANGE_INTERSECTS_MULTIPLE_BUFFERS]
D3D12 ERROR: ID3D12CommandList::ResourceBarrier: Before and after states must be different. [ RESOURCE_MANIPULATION ERROR #525: RESOURCE_BARRIER_MATCHING_STATES]
Exception thrown at 0x00007FF8793E3E49 in quad.exe: Microsoft C++ exception: _com_error at memory location 0x000000505476B370.
D3D12 ERROR: ID3D12CommandList::ResourceBarrier: Before and after states must be different. [ RESOURCE_MANIPULATION ERROR #525: RESOURCE_BARRIER_MATCHING_STATES]
Exception thrown at 0x00007FF8793E3E49 in quad.exe: Microsoft C++ exception: _com_error at memory location 0x000000505476B7B0.
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Command lists must be successfully closed before execution. [ EXECUTION ERROR #838: EXECUTECOMMANDLISTS_FAILEDCOMMANDLIST]
Exception thrown at 0x00007FF8793E3E49 in quad.exe: Microsoft C++ exception: _com_error at memory location 0x000000505476B880.
D3D12: Removing Device.
D3D12 ERROR: ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_INVALID_CALL: There is strong evidence that the application has performed an illegal or undefined operation, and such a condition could not be returned to the application cleanly through a return code). [ EXECUTION ERROR #232: DEVICE_REMOVAL_PROCESS_AT_FAULT]
Exception thrown at 0x00007FF8793E3E49 in quad.exe: Microsoft C++ exception: _com_error at memory location 0x0000005054763E08.
Exception thrown at 0x00007FF8793E3E49 in quad.exe: Microsoft C++ exception: _com_error at memory location 0x0000005054763F50.
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `-2005270523`: error on command allocator creation: 887a0005', src\backend\dx12\src\pool.rs:29:17
stack backtrace:
Loaded 'C:\Windows\System32\dbghelp.dll'.
   0: std::panicking::begin_panic_handler
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39\/library\std\src\panicking.rs:475
   1: std::panicking::begin_panic_fmt
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39\/library\std\src\panicking.rs:429
   2: gfx_backend_dx12::pool::PoolShared::acquire
             at .\src\backend\dx12\src\pool.rs:29
   3: gfx_backend_dx12::command::{{impl}}::begin
             at .\src\backend\dx12\src\command.rs:1202
   4: gfx_hal::command::CommandBuffer::begin_primary<gfx_backend_dx12::command::CommandBuffer,gfx_backend_dx12::Backend>
             at .\src\hal\src\command\mod.rs:113
   5: quad::Renderer<gfx_backend_dx12::Backend>::render<gfx_backend_dx12::Backend>
             at .\examples\quad\main.rs:837
   6: quad::main::{{closure}}
             at .\examples\quad\main.rs:179
   7: winit::platform_impl::platform::event_loop::{{impl}}::run_return::{{closure}}<tuple<>,closure-0>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\platform_impl\windows\event_loop.rs:200
   8: alloc::boxed::{{impl}}::call_mut<tuple<winit::event::Event<tuple<>>, mut winit::event_loop::ControlFlow*>,FnMut<tuple<winit::event::Event<tuple<>>, mut winit::event_loop::ControlFlow*>>>
             at C:\Users\Michael Welsh\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc\src\boxed.rs:1049
   9: winit::platform_impl::platform::event_loop::runner::{{impl}}::call_event_handler::{{closure}}<tuple<>>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\platform_impl\windows\event_loop\runner.rs:239
  10: std::panic::{{impl}}::call_once<tuple<>,closure-0>
             at C:\Users\Michael Welsh\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panic.rs:308
  11: std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure-0>,tuple<>>
             at C:\Users\Michael Welsh\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:373
  12: winit::window::{{impl}}::clone
  13: std::panicking::try<tuple<>,std::panic::AssertUnwindSafe<closure-0>>
             at C:\Users\Michael Welsh\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:337
  14: std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure-0>,tuple<>>
             at C:\Users\Michael Welsh\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panic.rs:379
  15: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<tuple<>>::catch_unwind<tuple<>,tuple<>,closure-0>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\platform_impl\windows\event_loop\runner.rs:150
  16: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<tuple<>>::call_event_handler<tuple<>>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\platform_impl\windows\event_loop\runner.rs:233
  17: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<tuple<>>::call_redraw_events_cleared<tuple<>>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\platform_impl\windows\event_loop\runner.rs:371
  18: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<tuple<>>::move_state_to<tuple<>>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\platform_impl\windows\event_loop\runner.rs:328
  19: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<tuple<>>::redraw_events_cleared<tuple<>>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\platform_impl\windows\event_loop\runner.rs:229
  20: winit::platform_impl::platform::event_loop::public_window_callback::{{closure}}<tuple<>>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\platform_impl\windows\event_loop.rs:821
  21: core::ops::function::FnOnce::call_once<closure-0,tuple<>>
             at C:\Users\Michael Welsh\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:227
  22: std::panic::{{impl}}::call_once<isize,closure-0>
             at C:\Users\Michael Welsh\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panic.rs:308
  23: std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure-0>,isize>
             at C:\Users\Michael Welsh\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:373
  24: std::panicking::try::do_catch<std::panic::AssertUnwindSafe<closure-0>,isize>
  25: std::panicking::try<isize,std::panic::AssertUnwindSafe<closure-0>>
             at C:\Users\Michael Welsh\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:337
  26: std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure-0>,isize>
             at C:\Users\Michael Welsh\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panic.rs:379
  27: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<tuple<>>::catch_unwind<tuple<>,isize,closure-0>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\platform_impl\windows\event_loop\runner.rs:150
  28: winit::platform_impl::platform::event_loop::public_window_callback<tuple<>>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\platform_impl\windows\event_loop.rs:1893
  29: DefSubclassProc
  30: DefSubclassProc
  31: CallWindowProcW
  32: DispatchMessageW
  33: SendMessageTimeoutW
  34: KiUserCallbackDispatcher
  35: NtUserDispatchMessage
  36: DispatchMessageW
  37: winit::platform_impl::platform::event_loop::EventLoop<tuple<>>::run_return<tuple<>,closure-0>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\platform_impl\windows\event_loop.rs:215
  38: winit::platform_impl::platform::event_loop::EventLoop<tuple<>>::run<tuple<>,closure-0>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\platform_impl\windows\event_loop.rs:185
  39: winit::event_loop::EventLoop<tuple<>>::run<tuple<>,closure-0>
             at C:\Users\Michael Welsh\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.22.2\src\event_loop.rs:149
  40: quad::main
             at .\examples\quad\main.rs:152
  41: core::ops::function::FnOnce::call_once<fn(),tuple<>>
Exception thrown at 0x00007FF8793E3E49 in quad.exe: Microsoft C++ exception:  ?? ::st_panic at memory location 0x0000005054763E78.
             at C:\Users\Michael Welsh\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:227
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
DROPPED!
D3D12 WARNING: Live ID3D12Device at 0x000002099D5B97D8, Refcount: 6 [ STATE_CREATION WARNING #274: LIVE_DEVICE]
D3D12 WARNING: 	Live ID3D12RootSignature at 0x00000209A01D5490, Refcount: 0, IntRef: 2 [ STATE_CREATION WARNING #577: LIVE_ROOTSIGNATURE]
D3D12 WARNING: 	Live ID3D12PipelineState at 0x00000209A6A6FEA0, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #572: LIVE_PIPELINESTATE]
D3D12 WARNING: 	Live ID3D12PipelineState at 0x00000209A6A77DA0, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #572: LIVE_PIPELINESTATE]
D3D12 WARNING: 	Live ID3D12Resource at 0x00000209A6A90710, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #575: LIVE_RESOURCE]
D3D12 WARNING: 	Live ID3D12Heap at 0x00000209A6A90460, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #579: LIVE_HEAP]
D3D12 WARNING: 	Live ID3D12Fence at 0x00000209A6B31A00, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #580: LIVE_MONITOREDFENCE]
D3D12 WARNING: 	Live ID3D12CommandQueue at 0x00000209A6B31C50, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #570: LIVE_COMMANDQUEUE]
D3D12 WARNING: 	Live ID3D12Fence at 0x00000209A6BD1C50, Name: Internal D3D12 Debug Fence, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #580: LIVE_MONITOREDFENCE]
D3D12 WARNING: 	Live ID3D12Fence at 0x00000209A6C56230, Name: Internal D3D12 Debug Fence, Refcount: 0, IntRef: 3 [ STATE_CREATION WARNING #580: LIVE_MONITOREDFENCE]
D3D12 WARNING: 	Live ID3D12CommandAllocator at 0x00000209A85B9C40, Refcount: 1, IntRef: 4 [ STATE_CREATION WARNING #571: LIVE_COMMANDALLOCATOR]
D3D12 WARNING: 	Live ID3D12GraphicsCommandList at 0x00000209A85BA150, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #573: LIVE_COMMANDLIST12]
D3D12 WARNING: 	Live ID3D12GraphicsCommandList at 0x00000209A84B8130, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #573: LIVE_COMMANDLIST12]
D3D12 WARNING: 	Live ID3D12GraphicsCommandList at 0x00000209A85368B0, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #573: LIVE_COMMANDLIST12]
D3D12 WARNING: 	Live ID3D12GraphicsCommandList at 0x00000209A8569360, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #573: LIVE_COMMANDLIST12]
Exception thrown at 0x00007FF8793E3E49 in quad.exe: Microsoft C++ exception:  ?? ::st_panic at memory location 0x0000005054769B98.
Unloaded 'C:\Windows\System32\d3d10warp.dll'.
D3D12 WARNING: Process is terminating. Using simple reporting. Please call ReportLiveObjects() at runtime for standard reporting. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: Live Producer at 0x000002099D5B97B8, Refcount: 3. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A01D5490, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A6A6FEA0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A6A77DA0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A6A90710, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A6A90460, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A6B31A00, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A6B31C50, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A6BD1C50, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A6C56230, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A85B9C40, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A85BA150, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A84B8130, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A85368B0, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: 	Live Object at 0x00000209A8569360, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D12 WARNING: Live                         Object :     14 [ STATE_CREATION WARNING #0: UNKNOWN]
DXGI WARNING: Live Producer at 0x000002099D593658, Refcount: 7. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: 	Live Object at 0x000002099D590580, Refcount: 1. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: 	Live Object at 0x00000209A6C04120, Refcount: 1. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: 	Live Object at 0x00000209A6C08A50, Refcount: 1. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: 	Live Object at 0x00000209A6C57550, Refcount: 1. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: 	Live Object at 0x00000209A6C579E0, Refcount: 1. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: 	Live Object at 0x00000209A81F06A0, Refcount: 1. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: Live                         Object :      6 [ STATE_CREATION WARNING #0: ]
The program '[12316] quad.exe' has exited with code 101 (0x65).
```

Short info header:
- GFX version: https://github.com/gfx-rs/gfx/commit/87a24bf390ddd0ee6bc34393d879f2d823aee67f
- OS: Windows 10 64-bit
- GPU: Nvidia Geforce 2080 Ti
dx12: Error on command allocator allocation
issue
created
kvark
username_1
Fixed by 57ce75cab889bd35ad00ffc4ccdc0665737bccd5
comment
closed
kvark
username_1
issue
created
Herschel
username_0
Confirmed fixed, thanks!
comment