ID3D11ShaderTrace::TraceReady Method

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

Syntax

public:
HRESULT TraceReady(
         UINT64 *pTestCount
)  

Parameters

pTestCount
Type: UINT64 *

[out, optional]

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

Type: HRESULT 

TraceReady returns:

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.

Requirements

Header: Declared in d3d11shadertracing.h.

Library: Use d3d11.lib.

See also

ID3D11ShaderTrace

ID3D11ShaderTrace Members