# D3D12ShaderResourceView::GetCPUDescriptorHandle ## 函数签名 ```cpp D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandle() const ``` ## 中文描述 获取着色器资源视图的 CPU 描述符句柄。 ## 返回值 `D3D12_CPU_DESCRIPTOR_HANDLE` - CPU 描述符句柄 ## 复杂度 O(1) ## 示例 ```cpp D3D12_CPU_DESCRIPTOR_HANDLE handle = srv->GetCPUDescriptorHandle(); ``` ## 示例 ```cpp D3D12_CPU_DESCRIPTOR_HANDLE handle = srv->GetCPUDescriptorHandle(); // 用于绑定到命令列表 commandList->SetGraphicsRootDescriptorTable(0, handle); ``` ## 相关文档 - [D3D12ShaderResourceView](shader-resource-view.md) - 类总览