microsoft / microsoft/DirectX-Graphics-Samples
Calling ExecuteCommandLists multiple times with same ID3D12CommandAllocator
@jenatali is already working on this.
Since Sep 20, 2021.
- Dominant language
- C++
- Stars
- 6.8k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm having an issue when calling ID3D12CommandQueue::ExecuteCommandLists multiple times in a frame using the same ID3D12CommandAllocator.
From what I understand from how ID3D12CommandAllocator works, it is possible to use an ID3D12CommandAllocator multiple times as long as Reset is not called while the memory is still used.
My issue is that the debugger will break when releasing the Device.
From my tests, here is a specific setup that reproduces it :
- The debug layer and GPU validation are both enabled
- A minimum of 2 frames buffering
- An empty command list followed by a command list with multiple draw ( workload seems to have an influence )
- Executing for some minimum amount of frames ( between 10 and 20 frames minimum )
I have joined a diff from the D3D12HelloFrameBuffering sample that reproduces the issue.
Test context :
- Happens on both NVidia and AMD GPUs.
- Happens in both debug and release
- Visual Studio 2017 Version 15.9.16
- Windows SDK 10.0.17763.0
Callstack :
KernelBase.dll!wil::details::DebugBreak(void) Unknown
DXGIDebug.dll!CDXGIDebug::RemoveProducer(void *) Unknown
d3d12SDKLayers.dll!NDebug::CDevice::FinalRelease(void) Unknown
d3d12SDKLayers.dll!CLayeredObject<class NDebug::CDevice>::Release(void) Unknown
D3D12.dll!TComObject<NOutermost::CDevice>::`scalar deleting destructor'() Unknown
D3D12.dll!TComObject<NOutermost::CDevice>::Release() Unknown
dxgi.dll!CMTUseCountedObject<class CDXGISwapChainApplicationClass>::Release(void) Unknown D3D12HelloFrameBuffering.exe!Microsoft::WRL::ComPtr<IDXGISwapChain3>::InternalRelease() Line 176 C++
D3D12HelloFrameBuffering.exe!Microsoft::WRL::ComPtr<IDXGISwapChain3>::~ComPtr<IDXGISwapChain3>() Line 232 C++
D3D12HelloFrameBuffering.exe!D3D12HelloFrameBuffering::~D3D12HelloFrameBuffering() C++
D3D12HelloFrameBuffering.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, char * __formal, int nCmdShow) Line 19 C++
D3D12HelloFrameBuffering.exe!invoke_main() Line 107 C++
D3D12HelloFrameBuffering.exe!__scrt_common_main_seh() Line 288 C++
D3D12HelloFrameBuffering.exe!__scrt_common_main() Line 331 C++
D3D12HelloFrameBuffering.exe!WinMainCRTStartup() Line 17 C++
kernel32.dll!00007ffd3bf37974() Unknown
ntdll.dll!00007ffd3ea6a271() Unknown
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.