ID3D12ShaderReflection::GetConstantBufferByIndex 方法 (d3d12shader.h)

按索引获取常量缓冲区。

语法

ID3D12ShaderReflectionConstantBuffer * GetConstantBufferByIndex(
  [in] UINT Index
);

参数

[in] Index

类型: UINT

从零开始的索引。

返回值

类型: ID3D12ShaderReflectionConstantBuffer*

指向常量缓冲区的指针 (请参阅 ID3D12ShaderReflectionConstantBuffer 接口) 。

备注

常量缓冲区向着色器提供标量常量或纹理常量。 着色器可以使用一个或多个常量缓冲区。 为了获得最佳性能,请根据常量更新的频率将常量分离到缓冲区中。

此方法的接口托管在现成的 DLL D3DCompiler_xx.dll 中。

要求

   
目标平台 Windows
标头 d3d12shader.h

请参阅

ID3D12ShaderReflection