ホーム › Graphics.Direct3D.Dxc › IDxcCompiler
IDxcCompiler
COMメソッド 3
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 HRESULT Compile(IDxcBlob* pSource, LPWSTR pSourceName, LPWSTR pEntryPoint, LPWSTR pTargetProfile, LPWSTR* pArguments, DWORD argCount, DxcDefine* pDefines, DWORD defineCount, IDxcIncludeHandler* pIncludeHandler, IDxcOperationResult** ppResult)
| pSource | IDxcBlob* | in | コンパイル対象のシェーダソースを保持するBlobを指すポインタ。 |
| pSourceName | LPWSTR | inoptional | 診断表示用のソース名(UTF-16)を指すポインタ。NULL可。 |
| pEntryPoint | LPWSTR | inoptional | シェーダのエントリポイント関数名(UTF-16)を指すポインタ。 |
| pTargetProfile | LPWSTR | in | ターゲットプロファイル(例:vs_6_0)を表す文字列を指すポインタ。 |
| pArguments | LPWSTR* | inoptional | 追加のコンパイラ引数の配列を指すポインタ。NULL可。 |
| argCount | DWORD | in | pArguments配列の要素数を指定する。 |
| pDefines | DxcDefine* | in | プリプロセッサ定義の配列を指すポインタ。NULL可。 |
| defineCount | DWORD | in | pDefines配列の要素数を指定する。 |
| pIncludeHandler | IDxcIncludeHandler* | inoptional | インクルード解決に用いるハンドラを指すポインタ。NULL可。 |
| ppResult | IDxcOperationResult** | out | コンパイル結果を保持する操作結果オブジェクトを受け取る出力ポインタ。 |
vtbl 4 HRESULT Preprocess(IDxcBlob* pSource, LPWSTR pSourceName, LPWSTR* pArguments, DWORD argCount, DxcDefine* pDefines, DWORD defineCount, IDxcIncludeHandler* pIncludeHandler, IDxcOperationResult** ppResult)
| pSource | IDxcBlob* | in | 前処理対象のシェーダソースを保持するBlobを指すポインタ。 |
| pSourceName | LPWSTR | inoptional | 診断表示用のソース名(UTF-16)を指すポインタ。NULL可。 |
| pArguments | LPWSTR* | inoptional | 追加のコンパイラ引数の配列を指すポインタ。NULL可。 |
| argCount | DWORD | in | pArguments配列の要素数を指定する。 |
| pDefines | DxcDefine* | in | プリプロセッサ定義の配列を指すポインタ。NULL可。 |
| defineCount | DWORD | in | pDefines配列の要素数を指定する。 |
| pIncludeHandler | IDxcIncludeHandler* | inoptional | インクルード解決に用いるハンドラを指すポインタ。NULL可。 |
| ppResult | IDxcOperationResult** | out | 前処理結果を保持する操作結果オブジェクトを受け取る出力ポインタ。 |
vtbl 5 HRESULT Disassemble(IDxcBlob* pSource, IDxcBlobEncoding** ppDisassembly)
| pSource | IDxcBlob* | in | 逆アセンブル対象のシェーダバイナリを保持するBlobを指すポインタ。 |
| ppDisassembly | IDxcBlobEncoding** | out | 逆アセンブル結果のテキストを格納したBlobを受け取る出力ポインタ。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IDxcCompiler "{8C210BF3-011F-4422-8D70-6F9ACB8DB617}" #usecom global IDxcCompiler IID_IDxcCompiler "{}" #comfunc global IDxcCompiler_Compile 3 sptr,wstr,wstr,wstr,var,int,var,int,sptr,sptr #comfunc global IDxcCompiler_Preprocess 4 sptr,wstr,var,int,var,int,sptr,sptr #comfunc global IDxcCompiler_Disassemble 5 sptr,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_IDxcCompiler "{8C210BF3-011F-4422-8D70-6F9ACB8DB617}" #usecom global IDxcCompiler IID_IDxcCompiler "{}" #comfunc global IDxcCompiler_Compile 3 sptr,wstr,wstr,wstr,sptr,int,sptr,int,sptr,sptr #comfunc global IDxcCompiler_Preprocess 4 sptr,wstr,sptr,int,sptr,int,sptr,sptr #comfunc global IDxcCompiler_Disassemble 5 sptr,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。