D3D11_TRACE_STATS structure (d3d11shadertracing.h)

Specifies statistics about a trace.

Syntax

typedef struct D3D11_TRACE_STATS {
  D3D11_SHADER_TRACE_DESC        TraceDesc;
  UINT8                          NumInvocationsInStamp;
  UINT8                          TargetStampIndex;
  UINT                           NumTraceSteps;
  D3D11_TRACE_COMPONENT_MASK     InputMask[32];
  D3D11_TRACE_COMPONENT_MASK     OutputMask[32];
  UINT16                         NumTemps;
  UINT16                         MaxIndexableTempIndex;
  UINT16                         IndexableTempSize[4096];
  UINT16                         ImmediateConstantBufferSize;
  UINT                           PixelPosition[4][2];
  UINT64                         PixelCoverageMask[4];
  UINT64                         PixelDiscardedMask[4];
  UINT64                         PixelCoverageMaskAfterShader[4];
  UINT64                         PixelCoverageMaskAfterA2CSampleMask[4];
  UINT64                         PixelCoverageMaskAfterA2CSampleMaskDepth[4];
  UINT64                         PixelCoverageMaskAfterA2CSampleMaskDepthStencil[4];
  BOOL                           PSOutputsDepth;
  BOOL                           PSOutputsMask;
  D3D11_TRACE_GS_INPUT_PRIMITIVE GSInputPrimitive;
  BOOL                           GSInputsPrimitiveID;
  D3D11_TRACE_COMPONENT_MASK     HSOutputPatchConstantMask[32];
  D3D11_TRACE_COMPONENT_MASK     DSInputPatchConstantMask[32];
} D3D11_TRACE_STATS;

Members

TraceDesc

A D3D11_SHADER_TRACE_DESC structure that describes the shader trace object for which this structure specifies statistics.

NumInvocationsInStamp

The number of calls in the stamp for the trace. This value is always 1 for vertex shaders, hull shaders, domain shaders, geometry shaders, and compute shaders. This value is 4 for pixel shaders.

TargetStampIndex

The index of the target stamp. This value is always 0 for vertex shaders, hull shaders, domain shaders, geometry shaders, and compute shaders. However, for pixel shaders this value indicates which of the four pixels in the stamp is the target for the trace. You can examine the traces for other pixels in the stamp to determine how derivative calculations occurred. You can make this determination by correlating the registers across traces.

NumTraceSteps

The total number of steps for the trace. This number is the same for all stamp calls.

InputMask[32]

The component trace mask for each input v# register. For information about D3D11_TRACE_COMPONENT_MASK, see D3D11_TRACE_VALUE.

For vertex shaders, geometry shaders, pixel shaders, hull shaders, and domain shaders, the valid range is [0..31]. For compute shaders, this member is not applicable. Also, inputs for geometry shaders are 2D-indexed. For example, consider v[vertex][attribute]. In this example, the range of [attribute] is [0..31]. The [vertex] axis is the same size for all inputs, which are determined by the GSInputPrimitive member.

Similarly, inputs for hull shader and domain shader are 2D-indexed. For example, consider v[vertex][attribute]. In this example, the range of [attribute] is [0..15]. The [vertex] axis is the same size for all inputs.

OutputMask[32]

The component trace mask for each output o# register. For information about D3D11_TRACE_COMPONENT_MASK, see D3D11_TRACE_VALUE.

For vertex shaders and geometry shaders, the valid range is [0..31]. For pixel shaders, the valid range is [0..7]. For compute shaders, this member is not applicable. For output control points for hull shaders, the registers are 2D-indexed. For example, consider ocp[vertex][attribute]. In this example, the range of [attribute] is [0..31]. The [vertex] axis is the same size for all inputs.

NumTemps

The number of temps, that is, 4x32 bit r# registers that are declared.

MaxIndexableTempIndex

The maximum index #+1 of all indexable temps x#[] that are declared. If they are declared sparsely (for example, x3[12] and x200[30] only), this value is 201 (200+1).

IndexableTempSize[4096]

The number of temps for each indexable temp x#[numTemps]. You can only have temps up to the value in the MaxIndexableTempIndex member.

ImmediateConstantBufferSize

The number of 4x32 bit values (if any) that are in the immediate constant buffer.

PixelPosition[4]

PixelCoverageMask[4]

Note  This member is for pixel shaders only, [stampIndex].
 
A mask that indicates which MSAA samples are covered for each stamp. This coverage occurs before alpha-to-coverage, depth, and stencil operations are performed on the pixel. For non-MSAA, examine the least significant bit (LSB). This mask can be 0 for pixels that are only executed to support derivatives for neighboring pixels.

PixelDiscardedMask[4]

Note  This member is for pixel shaders only, [stampIndex].
 
A mask that indicates discarded samples. If the pixel shader runs at pixel-frequency, "discard" turns off all the samples. If all the samples are off, the following four mask members are also 0.

PixelCoverageMaskAfterShader[4]

Note  This member is for pixel shaders only, [stampIndex].
 
A mask that indicates the MSAA samples that are covered. For non-MSAA, examine the LSB.

PixelCoverageMaskAfterA2CSampleMask[4]

Note  This member is for pixel shaders only, [stampIndex].
 
A mask that indicates the MSAA samples that are covered after alpha-to-coverage+sampleMask, but before depth and stencil. For non-MSAA, examine the LSB.

PixelCoverageMaskAfterA2CSampleMaskDepth[4]

Note  This member is for pixel shaders only, [stampIndex].
 
A mask that indicates the MSAA samples that are covered after alpha-to-coverage+sampleMask+depth, but before stencil. For non-MSAA, examine the LSB.

PixelCoverageMaskAfterA2CSampleMaskDepthStencil[4]

Note  This member is for pixel shaders only, [stampIndex].
 
A mask that indicates the MSAA samples that are covered after alpha-to-coverage+sampleMask+depth+stencil. For non-MSAA, examine the LSB.

PSOutputsDepth

A value that specifies whether this trace is for a pixel shader that outputs the oDepth register. TRUE indicates that the pixel shader outputs the oDepth register; otherwise, FALSE.

PSOutputsMask

A value that specifies whether this trace is for a pixel shader that outputs the oMask register. TRUE indicates that the pixel shader outputs the oMask register; otherwise, FALSE.

GSInputPrimitive

A D3D11_TRACE_GS_INPUT_PRIMITIVE-typed value that identifies the type of geometry shader input primitive. That is, this value identifies: {point, line, triangle, line_adj, triangle_adj} or the number of vertices: 1, 2, 3, 4, or 6 respectively. For example, for a line, input v[][#] is actually v[2][#]. For vertex shaders and pixel shaders, set this member to D3D11_TRACE_GS_INPUT_PRIMITIVE_UNDEFINED.

GSInputsPrimitiveID

A value that specifies whether this trace is for a geometry shader that inputs the PrimitiveID register. TRUE indicates that the geometry shader inputs the PrimitiveID register; otherwise, FALSE.

HSOutputPatchConstantMask[32]

Note  This member is for hull shaders only.
 
The component trace mask for the hull-shader output. For information about D3D11_TRACE_COMPONENT_MASK, see D3D11_TRACE_VALUE.

The D3D11_TRACE_INPUT_PRIMITIVE_ID_REGISTER value is available through a call to the ID3D11ShaderTrace::GetInitialRegisterContents method.

DSInputPatchConstantMask[32]

Note  This member is for domain shaders only.
 
The component trace mask for the domain-shader input. For information about D3D11_TRACE_COMPONENT_MASK, see D3D11_TRACE_VALUE.

The following values are available through a call to the ID3D11ShaderTrace::GetInitialRegisterContents method:

Remarks

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

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Header d3d11shadertracing.h

See also

ID3D11ShaderTrace::GetTraceStats

Shader Structures