ID3D11ShaderReflection インターフェイス

シェーダー リフレクション インターフェイスは、シェーダー情報にアクセスします。

IUnknown
   ID3D11ShaderReflection

このインターフェイスには以下のメソッドがあります。

メソッド 説明
ID3D11ShaderReflection::GetBitwiseInstructionCount ビット単位の命令の数を取得します。
ID3D11ShaderReflection::GetConstantBufferByIndex インデックスを指定して定数バッファーを取得します。
ID3D11ShaderReflection::GetConstantBufferByName 名前を指定して定数バッファーを取得します。
ID3D11ShaderReflection::GetConversionInstructionCount 変換命令の数を取得します。
ID3D11ShaderReflection::GetDesc シェーダーの記述を取得します。
ID3D11ShaderReflection::GetGSInputPrimitive ジオメトリ シェーダーの入力プリミティブの記述を取得します。
ID3D11ShaderReflection::GetInputParameterDesc シェーダーの入力パラメーターの記述を取得します。
ID3D11ShaderReflection::GetMinFeatureLevel シェーダーの最小機能レベルを取得します。
ID3D11ShaderReflection::GetMovInstructionCount Mov 命令の数を取得します。
ID3D11ShaderReflection::GetMovcInstructionCount Movc 命令の数を取得します。
ID3D11ShaderReflection::GetNumInterfaceSlots シェーダー内のインターフェイス スロットの数を取得します。
ID3D11ShaderReflection::GetOutputParameterDesc シェーダーの出力パラメーターの記述を取得します。
ID3D11ShaderReflection::GetPatchConstantParameterDesc シェーダーのパッチ定数パラメーターの記述を取得します。
ID3D11ShaderReflection::GetResourceBindingDesc シェーダーにバインドされているリソースの記述を取得します。
ID3D11ShaderReflection::GetResourceBindingDescByName シェーダーにバインドされているリソースの記述を取得します。
ID3D11ShaderReflection::GetVariableByName 名前によって変数を取得します。
ID3D11ShaderReflection::IsSampleFrequencyShader シェーダーがサンプル頻度シェーダーかどうかを示します。

シェーダーに対する ID3D11ShaderReflection インターフェイス インターフェイスは、D3DReflect を使用して取得できます。次のコードは、シェーダーから ID3D11ShaderReflection インターフェイス インターフェイスを取得する方法を示しています。

 pd3dDevice->CreatePixelShader( pPixelShaderBuffer->GetBufferPointer(),                                pPixelShaderBuffer->GetBufferSize(), g_pPSClassLinkage, &g_pPixelShader );  ID3D11ShaderReflection* pReflector = NULL;  D3DReflect( pPixelShaderBuffer->GetBufferPointer(), pPixelShaderBuffer->GetBufferSize(),              IID_ID3D11ShaderReflection, (void**) &pReflector);     

関連項目

シェーダー インターフェイス