I was trying to fix some D3D12 PSO compilation errors while migrating my company’s Unreal Engine plugin from D3D11 and wanted to register custom debug message callbacks like so: https://devblogs.microsoft.com/directx/d3d12-debug-layer-message-callback/. This fails, however, when the RenderDoc plugin is enabled. In fact, Unreal’s own D3D12 debug logging is silenced when RenderDoc is present.
Querying the ID3D12Device for the interface returns E_NO_INTERFACE
, which implies that RenderDoc may be improperly proxying the COM object. A similar RenderDoc bug previously existed for the original ID3D12InfoQueue interface: https://github.com/baldurk/renderdoc/issues/946. I don’t know how to test if this new issue is specific to Unreal Engine, though. Let me know if I should submit a bug report to RenderDoc instead.
Example:
check(GDynamicRHI->GetInterfaceType() == ERHIInterfaceType::D3D12);
TComPtr<ID3D12Device> Device = GetDynamicRHI<ID3D12DynamicRHI>()->RHIGetDevice(0);
// Works
TComPtr<ID3D12InfoQueue> InfoQueue;
HRESULT e = Device->QueryInterface<ID3D12InfoQueue>(&InfoQueue);
check(SUCCEEDED(e));
// Fails when the RenderDoc plugin is enabled
TComPtr<ID3D12InfoQueue1> InfoQueue1;
e = Device->QueryInterface<ID3D12InfoQueue1>(&InfoQueue1);
check(SUCCEEDED(e));