Disassembles a specific region of compiled Microsoft High Level Shader Language (HLSL) code.
HRESULT D3DDisassembleRegion(
LPCVOID pSrcData,
SIZE_T SrcDataSize,
UINT Flags,
LPCSTR szComments,
SIZE_T StartByteOffset,
SIZE_T NumInsts,
SIZE_T *pFinishByteOffset,
ID3DBlob **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.
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 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. |
szComments
Type: LPCSTR
[in, optional] An optional pointer to a constant null-terminated string at the top of the shader that identifies the shader constants and variables.
StartByteOffset
Type: SIZE_T
[in] The number of bytes offset into the compiled shader data where D3DDisassembleRegion starts the disassembly.
NumInsts
Type: SIZE_T
[in] The number of instructions to disassemble.
pFinishByteOffset
Type: SIZE_T *
[out, optional] A pointer to a variable that receives the number of bytes offset into the compiled shader data where D3DDisassembleRegion finishes the disassembly.
ppDisassembly
Type: ID3DBlob **
[out] A pointer to a buffer that receives the ID3DBlob interface that accesses the disassembled Microsoft High Level Shader Language (HLSL) code.
Type: HRESULT
Returns one of the Direct3D 11 return codes.
Note
The D3dcompiler_44.dll or later version of the file contains the D3DDisassembleRegion compiler function.
Header: Declared in d3dcompiler.h.
Library: Use d3d11.lib.