ID3D11ShaderTrace::TraceReady method (d3d11shadertracing.h)

Specifies that the shader trace recorded and is ready to use.

Syntax

HRESULT TraceReady(
  [out, optional] UINT64 *pTestCount
);

Parameters

[out, optional] pTestCount

An optional pointer to a variable that receives the number of times that a matching invocation for the trace occurred. If not used, set to NULL. For more information about this number, see Remarks.

Return value

TraceReady returns:

  • S_OK if the trace is ready.
  • S_FALSE if the trace is not ready.
  • E_OUTOFMEMORY if memory ran out while the trace was in the process of recording. You can try to record the trace again by calling ID3D11ShaderTrace::ResetTrace and then redrawing. If you decide not to record the trace again, release the ID3D11ShaderTrace interface.
  • Possibly other error codes that are described in Direct3D 11 Return Codes.

Remarks

If a trace is meant to record invocation 3 but only two invocations have happened so far, TraceReady sets the variable to which pTestCount points to 2. You can use this value to understand why a trace is not ready yet. Conversely, the variable to which pTestCount points might be larger than the requested invocation count for a trace that is ready. You can use this value to determine the number of invocations that ran past the required trace invocation count. For example, you might not know the number of overdraws that occur on a pixel for a given shader in a draw call. If you can redraw the scene identically, you can set up the traces this next time based on the value that TraceReady returned at pTestCount on the first pass.

If the shader trace recorded, you can successfully call the ID3D11ShaderTrace::GetTraceStats, ID3D11ShaderTrace::GetInitialRegisterContents, and ID3D11ShaderTrace::GetStep methods. You can call the ID3D11ShaderTrace::ResetTrace and ID3D11ShaderTrace::PSSelectStamp methods regardless of whether the shader trace recorded.

Note  This API requires the Windows Software Development Kit (SDK) for Windows 8.
 

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header d3d11shadertracing.h
DLL D3D11SDKLayers.dll; D3D11_1SDKLayers.dll; D3D11_2SDKLayers.dll

See also

ID3D11ShaderTrace