D3DDisassembleRegion function (d3dcompiler.h)

Disassembles a specific region of compiled Microsoft High Level Shader Language (HLSL) code.

Syntax

HRESULT D3DDisassembleRegion(
  [in]            LPCVOID  pSrcData,
  [in]            SIZE_T   SrcDataSize,
  [in]            UINT     Flags,
  [in, optional]  LPCSTR   szComments,
  [in]            SIZE_T   StartByteOffset,
  [in]            SIZE_T   NumInsts,
  [out, optional] SIZE_T   *pFinishByteOffset,
  [out]           ID3DBlob **ppDisassembly
);

Parameters

[in] pSrcData

A pointer to compiled shader data.

[in] SrcDataSize

The size, in bytes, of the block of memory that pSrcData points to.

[in] Flags

A combination of zero or more of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how D3DDisassembleRegion 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) This flag has no effect in D3DDisassembleRegion. Cycle information comes from the trace; therefore, cycle information is available only in D3DDisassemble11Trace's trace disassembly.

[in, optional] szComments

A pointer to a constant null-terminated string at the top of the shader that identifies the shader constants and variables.

[in] StartByteOffset

The number of bytes offset into the compiled shader data where D3DDisassembleRegion starts the disassembly.

[in] NumInsts

The number of instructions to disassemble.

[out, optional] pFinishByteOffset

A pointer to a variable that receives the number of bytes offset into the compiled shader data where D3DDisassembleRegion finishes the disassembly.

[out] ppDisassembly

A pointer to a buffer that receives the ID3DBlob interface that accesses the disassembled HLSL code.

Return value

Returns one of the Direct3D 11 return codes.

Remarks

Note  The D3dcompiler_44.dll or later version of the file contains the D3DDisassembleRegion compiler function.
 

Requirements

Requirement Value
Target Platform Windows
Header d3dcompiler.h
Library D3DCompiler.lib
DLL D3DCompiler_47.dll

See also

Functions