> ## 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.

# SetGraphicsRootConstantBufferView

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

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

## 语法

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

### 参数

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

绑定的插槽号。

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

常量缓冲区的 GPU 虚拟地址。
D3D12\_GPU\_VIRTUAL\_ADDRESS 是 UINT64 的类型定义别名。

### 返回值

类型：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

- [SetComputeRootConstantBufferView](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputerootconstantbufferview_public.md)
- [SetGraphicsRootUnorderedAccessView](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setgraphicsrootunorderedaccessview_public.md)
- [SetGraphicsRootShaderResourceView](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setgraphicsrootshaderresourceview_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)
