DirectX-Graphics-Samples: Running MiniEngine Sample removing device DXGI_ERROR_DEVICE_HUNG
Hi,
I’m getting the error
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]
at the following callstack:
D3D12RaytracingMiniEngineSample.exe!PostEffects::Render() Line 511 C++
D3D12RaytracingMiniEngineSample.exe!GameCore::UpdateApplication(GameCore::IGameApp & game) Line 77 C++
D3D12RaytracingMiniEngineSample.exe!GameCore::RunApplication(GameCore::IGameApp & app, const wchar_t * className) Line 356 C++
D3D12RaytracingMiniEngineSample.exe!wmain(int argc, wchar_t * * argv) Line 278 C++
Even after commenting out all code within the PostEffects::Render() function (other than context.begin() and context.finish()) the crash still occurs. With the d3d debug layer enabled I get the following output
D3D12 ERROR: CGraphicsCommandList::SetComputeRootDescriptorTable: Specified GPU Descriptor Handle (ptr = 0x13a79035420 at 1 offsetInDescriptorsFromDescriptorHeapStart) of type SRV, for Root Signature (0x0000013A0A687230:'Unnamed ID3D12RootSignature Object')'s Descriptor Table (at Parameter Index [4])'s Descriptor Range (at Range Index [0] of type D3D12_DESCRIPTOR_RANGE_TYPE_UAV) have mismatching types. All descriptors of descriptor ranges declared STATIC (not-DESCRIPTORS_VOLATILE) in a root signature must be initialized prior to being set on the command list. [ EXECUTION ERROR #646: INVALID_DESCRIPTOR_HANDLE]
D3D12 ERROR: CGraphicsCommandList::SetComputeRootDescriptorTable: Specified GPU Descriptor Handle (ptr = 0x13a79035420 at 2 offsetInDescriptorsFromDescriptorHeapStart) of type SRV, for Root Signature (0x0000013A0A687230:'Unnamed ID3D12RootSignature Object')'s Descriptor Table (at Parameter Index [4])'s Descriptor Range (at Range Index [0] of type D3D12_DESCRIPTOR_RANGE_TYPE_UAV) have mismatching types. All descriptors of descriptor ranges declared STATIC (not-DESCRIPTORS_VOLATILE) in a root signature must be initialized prior to being set on the command list. [ EXECUTION ERROR #646: INVALID_DESCRIPTOR_HANDLE]
D3D12 ERROR: CGraphicsCommandList::SetComputeRootDescriptorTable: Specified GPU Descriptor Handle (ptr = 0x13a79035420 at 3 offsetInDescriptorsFromDescriptorHeapStart) of type SRV, for Root Signature (0x0000013A0A687230:'Unnamed ID3D12RootSignature Object')'s Descriptor Table (at Parameter Index [4])'s Descriptor Range (at Range Index [0] of type D3D12_DESCRIPTOR_RANGE_TYPE_UAV) have mismatching types. All descriptors of descriptor ranges declared STATIC (not-DESCRIPTORS_VOLATILE) in a root signature must be initialized prior to being set on the command list. [ EXECUTION ERROR #646: INVALID_DESCRIPTOR_HANDLE]
D3D12 ERROR: CGraphicsCommandList::SetComputeRootDescriptorTable: Specified GPU Descriptor Handle (ptr = 0x13a79035420 at 4 offsetInDescriptorsFromDescriptorHeapStart) of type SRV, for Root Signature (0x0000013A0A687230:'Unnamed ID3D12RootSignature Object')'s Descriptor Table (at Parameter Index [4])'s Descriptor Range (at Range Index [0] of type D3D12_DESCRIPTOR_RANGE_TYPE_UAV) have mismatching types. All descriptors of descriptor ranges declared STATIC (not-DESCRIPTORS_VOLATILE) in a root signature must be initialized prior to being set on the command list. [ EXECUTION ERROR #646: INVALID_DESCRIPTOR_HANDLE]
D3D12 ERROR: CGraphicsCommandList::SetComputeRootDescriptorTable: Specified GPU Descriptor Handle (ptr = 0x13a79035420 at 5 offsetInDescriptorsFromDescriptorHeapStart) of type SRV, for Root Signature (0x0000013A0A687230:'Unnamed ID3D12RootSignature Object')'s Descriptor Table (at Parameter Index [4])'s Descriptor Range (at Range Index [0] of type D3D12_DESCRIPTOR_RANGE_TYPE_UAV) have mismatching types. All descriptors of descriptor ranges declared STATIC (not-DESCRIPTORS_VOLATILE) in a root signature must be initialized prior to being set on the command list. [ EXECUTION ERROR #646: INVALID_DESCRIPTOR_HANDLE]
D3D12 ERROR: CGraphicsCommandList::SetComputeRootDescriptorTable: Specified GPU Descriptor Handle (ptr = 0x13a79035420 at 6 offsetInDescriptorsFromDescriptorHeapStart) of type SRV, for Root Signature (0x0000013A0A687230:'Unnamed ID3D12RootSignature Object')'s Descriptor Table (at Parameter Index [4])'s Descriptor Range (at Range Index [0] of type D3D12_DESCRIPTOR_RANGE_TYPE_UAV) have mismatching types. All descriptors of descriptor ranges declared STATIC (not-DESCRIPTORS_VOLATILE) in a root signature must be initialized prior to being set on the command list. [ EXECUTION ERROR #646: INVALID_DESCRIPTOR_HANDLE]
D3D12 ERROR: CGraphicsCommandList::SetComputeRootDescriptorTable: Specified GPU Descriptor Handle (ptr = 0x13a79035420 at 7 offsetInDescriptorsFromDescriptorHeapStart) of type SRV, for Root Signature (0x0000013A0A687230:'Unnamed ID3D12RootSignature Object')'s Descriptor Table (at Parameter Index [4])'s Descriptor Range (at Range Index [0] of type D3D12_DESCRIPTOR_RANGE_TYPE_UAV) have mismatching types. All descriptors of descriptor ranges declared STATIC (not-DESCRIPTORS_VOLATILE) in a root signature must be initialized prior to being set on the command list. [ EXECUTION ERROR #646: INVALID_DESCRIPTOR_HANDLE]
D3D12 ERROR: CGraphicsCommandList::SetComputeRootDescriptorTable: Specified GPU Descriptor Handle (ptr = 0x13a79035420 at 8 offsetInDescriptorsFromDescriptorHeapStart) of type SRV, for Root Signature (0x0000013A0A687230:'Unnamed ID3D12RootSignature Object')'s Descriptor Table (at Parameter Index [4])'s Descriptor Range (at Range Index [0] of type D3D12_DESCRIPTOR_RANGE_TYPE_UAV) have mismatching types. All descriptors of descriptor ranges declared STATIC (not-DESCRIPTORS_VOLATILE) in a root signature must be initialized prior to being set on the command list. [ EXECUTION ERROR #646: INVALID_DESCRIPTOR_HANDLE]
D3D12 ERROR: CGraphicsCommandList::SetComputeRootDescriptorTable: Specified GPU Descriptor Handle (ptr = 0x13a79035420 at 9 offsetInDescriptorsFromDescriptorHeapStart) of type SRV, for Root Signature (0x0000013A0A687230:'Unnamed ID3D12RootSignature Object')'s Descriptor Table (at Parameter Index [4])'s Descriptor Range (at Range Index [0] of type D3D12_DESCRIPTOR_RANGE_TYPE_UAV) have mismatching types. All descriptors of descriptor ranges declared STATIC (not-DESCRIPTORS_VOLATILE) in a root signature must be initialized prior to being set on the command list. [ EXECUTION ERROR #646: INVALID_DESCRIPTOR_HANDLE]
at
D3D12RaytracingMiniEngineSample.exe!D3D12RaytracingMiniEngineSample::RaytraceDiffuse(GraphicsContext & context, const Math::Camera & camera, ColorBuffer & colorTarget) Line 1588 C++
D3D12RaytracingMiniEngineSample.exe!D3D12RaytracingMiniEngineSample::Raytrace(GraphicsContext & gfxContext) Line 1692 C++
D3D12RaytracingMiniEngineSample.exe!D3D12RaytracingMiniEngineSample::RenderScene() Line 1396 C++
D3D12RaytracingMiniEngineSample.exe!GameCore::UpdateApplication(GameCore::IGameApp & game) Line 75 C++
D3D12RaytracingMiniEngineSample.exe!GameCore::RunApplication(GameCore::IGameApp & app, const wchar_t * className) Line 356 C++
D3D12RaytracingMiniEngineSample.exe!wmain(int argc, wchar_t * * argv) Line 278 C++
I’m not sure if any of this is helpful, but I’m running this on a GTX1050 on 411.70 drivers. For what it’s worth all of the other samples in this solution work as expected.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (1 by maintainers)
I found a work-around of this problem (at least on my device). Maybe you guys can have a try.
The solution is to make RayPayload a 20 byte struct.
In ModelViewerRayTracing.h
change
struct RayPayload { bool SkipShading; float RayHitT; };
to
struct RayPayload { float4 SkipShading; float RayHitT; };
And in all ray tracing shaders, use SkipShading = float4(1,1,1,1) to represent SkipShading = true, use SkipShading = float4(0,0,0,0) to represent SkipShading = false. Adjust all conditionals that uses SkipShading accordingly.
I discovered this by trying to get at close as possible to other working ray tracing samples. (for example, the procedural geometry one).
In the procedural geometry sample, RayPayload is a 20 byte struct that stores a color and a recursion count. Therefore I also change the RayPayload in miniEngine sample to 20 bytes.
I guess there is some alignment issue for the miniEngine sample running on fallback layer on older Nvidia architecture. Hope the contributors can provide some explanations.
PS: You also need to change shaderConfig.MaxPayloadSizeInBytes = 8 to 20 in ModelViewer.cpp
Hi
I got the same error when I was build the ModelViewer.cpp But the Exception is cause by TextureManager.cpp on line 55
ASSERT_SUCCEEDED(g_Device->CreateCommittedResource(&HeapProps, D3D12_HEAP_FLAG_NONE, &texDesc,
I’m building this on GTX1080Ti with the same exception… is there some thing i missed?
btw, I already tried to change the TdrLimitTime in regedit editor.