Advertisement

GPU Hung after Swapchain->Present(0,0)

Started by January 04, 2019 02:45 AM
4 comments, last by iGrfx 6 years, 1 month ago

I encountered an issue:

My app after first or second tick will trigger a TDR, the log said 'D3D12: Removing Device.' I have tuned TDRDelay to 20 seconds.

I assume there are some memory issues here. But how can I debug it in an appropriate way?

It is possible there is an error before that, which you just don't see. Try enabling debug layer in D3D12, this is done by doing the following before your device creation:


ID3D12Debug* dbg;
D3D12GetDebugInterface(__uuidof(ID3D12Debug), (void**)&dbg);
dbg->EnableDebugLayer();
dbg->Release();

Which could give you more information before you receive Removing Device message.

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

Advertisement
20 hours ago, Vilem Otte said:

It is possible there is an error before that, which you just don't see. Try enabling debug layer in D3D12, this is done by doing the following before your device creation:



ID3D12Debug* dbg;
D3D12GetDebugInterface(__uuidof(ID3D12Debug), (void**)&dbg);
dbg->EnableDebugLayer();
dbg->Release();

Which could give you more information before you receive Removing Device message.

I did:

image.png.758aeca6faa78bd58bab1ff26096452a.pngand this is what I got:

image.thumb.png.747e08c863d516a7dad53e574f5e6834.png

I tried to use PIX to capture TDR, although PIX told me it founded a TDR, there is nothing helpful:

image.thumb.png.b7e7445d2c3af780ab502bd16e37ac52.png

I known the device removed, but I can't find any tools could tell me its source.

Just to make sure - you're enabling the debug layer before you create your device?

From your PIX screenshot, you're using the new DXR stuff? That's all new, so I wouldn't be surprised if the debug/validation layer for catching usage errors isn't quite complete for it yet... That leaves you with the old binary search -- comment out half a frame's worth of code and see if the crash goes away. If not, comment another half, etc... If it does, uncomment half of the previously commented part... :|

3 hours ago, Hodgman said:

Just to make sure - you're enabling the debug layer before you create your device?

From your PIX screenshot, you're using the new DXR stuff? That's all new, so I wouldn't be surprised if the debug/validation layer for catching usage errors isn't quite complete for it yet... That leaves you with the old binary search -- comment out half a frame's worth of code and see if the crash goes away. If not, comment another half, etc... If it does, uncomment half of the previously commented part... :|

Thanks for your suggestion :)

Yes, I enabled the debug layer before I created the device. I'm learning DXR now. I think should do what you said since no tools could help me out ?! :(

 

This topic is closed to new replies.

Advertisement