Files
XCEngine/docs/api/rhi/d3d12/common/get-descriptor-handle-increment-size.md
2026-03-20 02:35:45 +08:00

828 B
Raw Blame History

D3D12Common::GetDescriptorHandleIncrementSize

inline UINT GetDescriptorHandleIncrementSize(ID3D12Device* device, D3D12_DESCRIPTOR_HEAP_TYPE heapType)

获取指定描述符堆类型的描述符增量大小(增量偏移值)。

参数:

  • device - D3D12 设备指针
  • heapType - 描述符堆类型(D3D12_DESCRIPTOR_HEAP_TYPE

返回: 指定类型的描述符增量大小(字节)

线程安全: (只读操作)

示例:

ID3D12Device* device = ...;
UINT rtvIncSize = GetDescriptorHandleIncrementSize(device, D3D12_DESCRIPTOR_HEAP_TYPE_RTV);
UINT srvIncSize = GetDescriptorHandleIncrementSize(device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);

相关文档