依名稱取得著色器反映變數。
語法
ID3D12ShaderReflectionVariable * GetVariableByName(
[in] LPCSTR Name
);
參數
[in] Name
類型: LPCSTR
變數名稱。
傳回值
類型: ID3D12ShaderReflectionVariable*
傳回 (列表標記結尾的 sentinel 物件) 。 若要判斷 GetVariableByName 是否已順利完成,請呼叫 ID3D12ShaderReflectionVariable::GetDesc 並檢查傳回的 HRESULT;成功以外的任何傳回值表示 GetVariableByName 失敗。
備註
此方法的介面裝載於現用 DLL D3DCompiler_xx.dll 中。
規格需求
| 需求 | 值 |
|---|---|
| 目標平台 | Windows |
| 標頭 | d3d12shader.h |