Debugging Helpers

Understanding how to interpret the API trace is important in understanding how a frame is assembled.

Instrumenting your application with some extra debugging code can help tremendously in finding performance hotspots and rendering issues.

Inserting PerfMarkers

Debug-only PerfMarkers can be inserted into ID3D12GraphicsCommandList instances to help identify calls associated with a specific portion of a rendered frame. There are two separate calls that are used to surround sections to be identified within a trace:

void STDMETHODCALLTYPE ID3D12GraphicsCommandList::BeginEvent(UINT Metadata, const void* pData, UINT Size);
void STDMETHODCALLTYPE ID3D12GraphicsCommandList::EndEvent()
By default, PerfMarkers are displayed as green items in the timeline that show the contents of the pData LPCWSTR argument.