D3D10DisassembleEffect function

This function -- which disassembles a compiled effect into a text string that contains assembly instructions and register assignments -- has been deprecated. Instead, use D3DDisassemble10Effect.

Syntax


HRESULT D3D10DisassembleEffect(
  _In_   ID3D10Effect *pEffect,
  _In_   BOOL EnableColorCode,
  _Out_  ID3D10Blob **ppDisassembly
);

Parameters

pEffect [in]

Type: ID3D10Effect*

A pointer to an ID3D10Effect Interface, which contains the compiled effect.

EnableColorCode [in]

Type: BOOL

Include HTML tags in the output to color code the result.

ppDisassembly [out]

Type: ID3D10Blob**

A pointer to an ID3D10Blob Interface which contains the disassembled shader.

Return value

Type: HRESULT

Returns one of the following Direct3D 10 Return Codes.

Remarks

This returned text includes a header with the version of the HLSL compiler used to generate this object, comments describing the memory layout of the constant buffers used by the shader, input and output signatures, and resource binding points.

Here is an example of disassembling a compiled effect. The example assumes you start with a compiled effect (shown as


l_pBlob_Effect

which you can see in Compile an Effect (Direct3D 10)).


LPCSTR commentString = NULL;
ID3D10Blob* pIDisassembly = NULL;
char* pDisassembly = NULL;
if( pVSBuf )
{
    D3D10DisassembleEffect( (UINT*) l_pBlob_Effect->GetBufferPointer(),
        l_pBlob_Effect->GetBufferSize(), TRUE, commentString, &pIDisassembly );
    if( pIDisassembly )
    {
        FILE* pFile = fopen( "effect.htm", "w" );
        if( pFile)
        {
            fputs( (char*)pIDisassembly->GetBufferPointer(), pFile );
            fclose( pFile );
        }
    }
}


Requirements

Header

D3D10Effect.h

Library

D3D10.lib

DLL

D3D10.dll

See also

Effect Functions (Direct3D 10)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft