Odin icon indicating copy to clipboard operation
Odin copied to clipboard

Add ID3D11Debug interface to d3d11 package

Open Lperlind opened this issue 3 years ago • 0 comments

Title says it all. dx12 had its IDebug but it was missing for dx11. Interface found here: https://docs.microsoft.com/en-us/windows/win32/api/d3d11sdklayers/nn-d3d11sdklayers-id3d11debug

Verified with:

debug: ^d3d11.IDebug
device->QueryInterface(d3d11.IDebug_UUID, (^rawptr)(&debug))
assert(debug != nil)

debug->SetFeatureMask(.FINISH_PER_RENDER_OP)
assert(debug->GetFeatureMask() == .FINISH_PER_RENDER_OP)

debug->SetPresentPerRenderOpDelay(0x1)
assert(debug->GetPresentPerRenderOpDelay() == 0x1)

swap: ^dxgi.ISwapChain
debug->SetSwapChain(swap)
swap_out: ^dxgi.ISwapChain
debug->GetSwapChain(&swap_out)
assert(swap_out == swap)

debug->ValidateContext(device_context)

debug->ValidateContextForDispatch(device_context)

debug->ReportLiveDeviceObjects(.DETAIL)

Lperlind avatar Aug 10 '22 12:08 Lperlind