> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SetComputeRootConstantBufferView

> 在计算根签名中为常量缓冲区设置 CPU 描述符句柄。

在计算根签名中为常量缓冲区设置 CPU 描述符句柄。

## 语法

```cpp theme={null}
void SetComputeRootConstantBufferView(
    UINT RootParameterIndex,
    D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
)
```

### 参数

*RootParameterIndex \[in]*\
类型：UINT

绑定的插槽号。

*BufferLocation \[in]*\
类型：D3D12\_GPU\_VIRTUAL\_ADDRESS

指定常量缓冲区的 D3D12\_GPU\_VIRTUAL\_ADDRESS。

### 返回值

类型：void

无。

## 要求

**头文件：** d3d12\_xs.h 或 d3d12\_x.h\
**库：** d3d12\_xs.lib 或 d3d12\_x.lib\
**支持的平台**：XBOX Series 主机和 XBOX One 系列

## 另请参阅

[ID3D12GraphicsCommandList](/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList/id3d12graphicscommandlist_xs)


## Related topics

- [SetGraphicsRootConstantBufferView](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setgraphicsrootconstantbufferview_public.md)
- [SetComputeRootShaderResourceView](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputerootshaderresourceview_public.md)
- [SetComputeRootUnorderedAccessView](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputerootunorderedaccessview_public.md)
- [SetComputeRoot32BitConstant](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputeroot32bitconstant_public.md)
- [SetComputeRoot32BitConstants](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputeroot32bitconstants_public.md)
