828 B
828 B
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);