Disassembles a section of compiled Microsoft High Level Shader Language (HLSL) code that is specified by shader trace steps.
HRESULT D3DDisassemble11Trace(
LPCVOID pSrcData,
SIZE_T SrcDataSize,
ID3D11ShaderTrace *pTrace,
UINT StartStep,
UINT NumSteps,
UINT Flags,
ID3D10Blob **ppDisassembly
)
pSrcData
Type: LPCVOID
[in] A pointer to compiled shader data.
SrcDataSize
Type: SIZE_T
[in] The size, in bytes, of the block of memory that pSrcData points to.
pTrace
Type: ID3D11ShaderTrace *
[in] A pointer to the ID3D11ShaderTrace interface for the shader trace information object.
StartStep
Type: UINT
[in] The number of the step in the trace from which D3DDisassemble11Trace starts the disassembly.
NumSteps
Type: UINT
[in] The number of trace steps to disassemble.
Flags
Type: UINT
[in] A combination of zero or more of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how D3DDisassemble11Trace disassembles the compiled shader data.
| Flag | Description |
|---|---|
| D3D_DISASM_ENABLE_COLOR_CODE (0x01) | Enable the output of color codes. |
| D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS (0x02) | Enable the output of default values. |
| D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING (0x04) | Enable instruction numbering. |
| D3D_DISASM_ENABLE_INSTRUCTION_CYCLE (0x08) | No effect. |
| D3D_DISASM_DISABLE_DEBUG_INFO (0x10) | Disable the output of debug information. |
| D3D_DISASM_ENABLE_INSTRUCTION_OFFSET (0x20) | Enable the output of instruction offsets. |
| D3D_DISASM_INSTRUCTION_ONLY (0x40) | Enable the output of the instruction cycle per step in D3DDisassemble11Trace. This flag is similar to the D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING and D3D_DISASM_ENABLE_INSTRUCTION_OFFSET flags. This flag has no effect in the D3DDisassembleRegion function. Cycle information comes from the trace; therefore, cycle information is available only in the trace disassembly. |
ppDisassembly
Type: ID3D10Blob **
[out] A pointer to a buffer that receives the ID3DBlob interface that accesses the disassembled HLSL code.
Type: HRESULT
S_OK if successful; otherwise, an error code.
D3DDisassemble11Trace walks the steps of a shader trace and outputs appropriate disassembly for each step that is based on the step’s instruction index. The disassembly is annotated with register-value information from the trace. The behavior of D3DDisassemble11Trace differs from D3DDisassemble in that instead of the static disassembly of a compiled shader that D3DDisassemble performs, D3DDisassemble11Trace provides an execution trace that is based on the shader trace information.
Note The D3dcompiler_44.dll or later version of the file contains the D3DDisassemble11Trace compiler function.
Header: Declared in d3d11shadertracing.h.
Library: Use d3d11.lib.