D3DGetTraceInstructionOffsets function (d3dcompiler.h)

Retrieves the byte offsets for instructions within a section of shader code.

Syntax

HRESULT D3DGetTraceInstructionOffsets(
  [in]            LPCVOID pSrcData,
  [in]            SIZE_T  SrcDataSize,
  [in]            UINT    Flags,
  [in]            SIZE_T  StartInstIndex,
  [in]            SIZE_T  NumInsts,
  [out, optional] SIZE_T  *pOffsets,
  [out, optional] SIZE_T  *pTotalInsts
);

Parameters

[in] pSrcData

A pointer to the compiled shader data.

[in] SrcDataSize

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

[in] Flags

A combination of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how D3DGetTraceInstructionOffsets retrieves the instruction offsets.

Flag Description
D3D_GET_INST_OFFSETS_INCLUDE_NON_EXECUTABLE (0x01) Include non-executable code in the retrieved information.

[in] StartInstIndex

The index of the instruction in the compiled shader data for which D3DGetTraceInstructionOffsets starts to retrieve the byte offsets.

[in] NumInsts

The number of instructions for which D3DGetTraceInstructionOffsets retrieves the byte offsets.

[out, optional] pOffsets

A pointer to a variable that receives the actual number of offsets.

[out, optional] pTotalInsts

A pointer to a variable that receives the total number of instructions in the section of shader code.

Return value

Returns one of the Direct3D 11 return codes.

Remarks

A new kind of Microsoft High Level Shader Language (HLSL) debugging information from a program database (PDB) file uses instruction-byte offsets within a shader blob (arbitrary-length data buffer). You use D3DGetTraceInstructionOffsets to translate to and from instruction indexes.

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

Requirements

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

See also

Functions