Retrieves the byte offsets for instructions within a section of shader code.
HRESULT D3DGetTraceInstructionOffsets(
LPCVOID pSrcData,
SIZE_T SrcDataSize,
UINT Flags,
SIZE_T StartInstIndex,
SIZE_T NumInsts,
SIZE_T *pOffsets,
SIZE_T *pTotalInsts
)
pSrcData
Type: LPCVOID
[in] A pointer to the 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 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. |
StartInstIndex
Type: SIZE_T
[in] The index of the instruction in the compiled shader data for which D3DGetTraceInstructionOffsets starts to retrieve the byte offsets.
NumInsts
Type: SIZE_T
[in] The number of instructions for which D3DGetTraceInstructionOffsets retrieves the byte offsets.
pOffsets
Type: SIZE_T *
[out, optional] A pointer to a variable that receives the actual number of offsets.
pTotalInsts
Type: SIZE_T *
[out, optional] A pointer to a variable that receives the total number of instructions in the section of shader code.
Type: HRESULT
Returns one of the Direct3D 11 return codes.
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.
Header: Declared in d3dcompiler.h.
Library: Use d3d11.lib.