Hi
I'm (still) strugling with adding DXR into my engine
Now when all the infrastructure is in place I'm trying to launch it (NVidia 2080, Latest Windows 10, latest nvidia drivers, all DXR examples and DXR implementation in UE4 works just fine)
I cannot create ID3D12StateObject
Here is the dump of object in question with comments (marked --->) what is what
--------------------------------------------------------------------
---> [This is my library, and mapping of library into unique names, since in future I can have multiple libraries with that same names]
| D3D12 State Object 0x0000004AB897D238: Raytracing Pipeline
| [0]: DXIL Library 0x000001B1CA8A0100, 18500 bytes
| [0]: ?RayGeneration@@YAXXZ --> RG_010C79FD_D1D898AD_?RayGeneration@@YAXXZ
| [1]: ?RayHit@@YAXURayPayload@@UBuiltInTriangleIntersectionAttributes@@@Z --> RH_010C79FD_D1D898AD_?RayHit@@YAXURayPayload@@UBuiltInTriangleIntersectionAttributes@@@Z
| [2]: ?RayMiss@@YAXURayPayload@@@Z --> RM_010C79FD_D1D898AD_?RayMiss@@YAXURayPayload@@@Z
|--------------------------------------------------------------------
---> [This is my hit group]
| [1]: Hit Group (Hit_15D00DA7_C3757D0A)
| [0]: Any Hit Import: [none]
| [1]: Closest Hit Import: RH_010C79FD_D1D898AD_?RayHit@@YAXURayPayload@@UBuiltInTriangleIntersectionAttributes@@@Z
| [2]: Intersection Import: [none]
|--------------------------------------------------------------------
---> [This is my local RootSignature]
| [2]: Local Root Signature 0x000001B1CABCB5F0
|--------------------------------------------------------------------
---> [That is assigned to my HitGroup]
| [3]: Subobject to Exports Association (Subobject [2])
| [0]: Hit_15D00DA7_C3757D0A
|--------------------------------------------------------------------
---> [This is my local RootSignature]
| [4]: Local Root Signature 0x000001B1CABCB5F8
|--------------------------------------------------------------------
---> [That is assigned to my RayGen shader]
| [5]: Subobject to Exports Association (Subobject [4])
| [0]: RG_010C79FD_D1D898AD_?RayGeneration@@YAXXZ
|--------------------------------------------------------------------
---> [This is my local RootSignature]
| [6]: Local Root Signature 0x000001B1CABCB600
|--------------------------------------------------------------------
---> [That is assigned to my RayMiss shader]
| [7]: Subobject to Exports Association (Subobject [6])
| [0]: RM_010C79FD_D1D898AD_?RayMiss@@YAXURayPayload@@@Z
|--------------------------------------------------------------------
---> [This is Raytracing config, sizeof(RayPayload) == 64, attributes are 2 floats (barycentrics) so I pass 8]
| [8]: Raytracing Shader Config
| [0]: Max Payload Size: 64 bytes
| [1]: Max Attribute Size: 8 bytes
|--------------------------------------------------------------------
---> [This associates HitGroup, RayGen and RayMiss shader to Raytracing config]
| [9]: Subobject to Exports Association (Subobject [8])
| [0]: Hit_15D00DA7_C3757D0A
| [1]: RG_010C79FD_D1D898AD_?RayGeneration@@YAXXZ
| [2]: RM_010C79FD_D1D898AD_?RayMiss@@YAXURayPayload@@@Z
|--------------------------------------------------------------------
---> [This is Pipeline config with recursion set to 2]
| [10]: Raytracing Pipeline Config
| [0]: Max Recursion Depth: 2
|--------------------------------------------------------------------
---> [This is global root signature for all shaders]
| [11]: Global Root Signature 0x0000004AB897CA28
|--------------------------------------------------------------------
---> [This is empty local signature *(1)]
| [12]: Local Root Signature 0x0000004AB897D130
|--------------------------------------------------------------------
*(1) According to NVIDIA the current implementation of DXR requires pipelines to contain at least one global and one local empty root signatures, which do not have to be associated with any shader.
D3D12_STATE_OBJECT_DESC StateDesc;
StateDesc.NumSubobjects = UINT(StateSubObjects.size());
StateDesc.pSubobjects = &StateSubObjects[0];
StateDesc.Type = D3D12_STATE_OBJECT_TYPE_RAYTRACING_PIPELINE;
GetDevice()->CreateStateObject(&StateDesc, __uuidof(ID3D12StateObject), (void **)&StateObject)
And here is error message - witch is not very helpfull
D3D12: Removing Device.
D3D12 WARNING: ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DRIVER_INTERNAL_ERROR: There is strong evidence that the driver has performed an undefined operation; but it may be because the application performed an illegal or undefined operation to begin with.). [ EXECUTION WARNING #233: DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT]
Ofcourse all Root signatures are legit, the library is legit, etc.
Is there something aparrently wrong with my D3D12_STATE_OBJECT_DESC ?
How to debug this kind of problem, since the D3D12_STATE_OBJECT_DESC is realy simple, and 'should just work or spill anything usefull out of log'
(I'v tried with both state #12 added, and without - no difference at all)