ID3D12ShaderReflectionVariable 接口 (d3d12shader.h)

此着色器反射接口提供对变量的访问。

方法

ID3D12ShaderReflectionVariable 接口包含以下方法。

 
ID3D12ShaderReflectionVariable::GetBuffer

返回当前 ID3D12ShaderReflectionVariable 的 ID3D12ShaderReflectionConstantBuffer。
ID3D12ShaderReflectionVariable::GetDesc

获取着色器变量说明。
ID3D12ShaderReflectionVariable::GetInterfaceSlot

获取代表接口指针的变量的相应接口槽。 (ID3D12ShaderReflectionVariable.GetInterfaceSlot)
ID3D12ShaderReflectionVariable::GetType

获取着色器变量类型。

注解

若要获取着色器反射变量接口,请调用 ID3D12ShaderReflection::GetVariableByName 等方法。 这不是 COM 接口,因此无需担心引用计数,也无需在完成操作后释放接口。

要求

要求
目标平台 Windows
标头 d3d12shader.h

另请参阅

着色器接口