| 63 | } |
| 64 | |
| 65 | DescriptorHandle DescriptorHeap::Allocate() |
| 66 | { |
| 67 | Assert_(Heap != nullptr); |
| 68 | Assert_(Allocated < NumDescriptors); |
| 69 | uint64 idx = DeadList[Allocated]; |
| 70 | ++Allocated; |
| 71 | |
| 72 | DescriptorHandle handle; |
| 73 | handle.CPUHandle = CPUStart; |
| 74 | handle.CPUHandle.ptr += idx * DescriptorSize; |
| 75 | if(ShaderVisible) |
| 76 | { |
| 77 | handle.GPUHandle = GPUStart; |
| 78 | handle.GPUHandle.ptr += idx * DescriptorSize; |
| 79 | } |
| 80 | |
| 81 | #if UseAsserts_ |
| 82 | handle.ParentHeap = reinterpret_cast<const void*>(this); |
| 83 | #endif |
| 84 | |
| 85 | return handle; |
| 86 | } |
| 87 | |
| 88 | void DescriptorHeap::Free(DescriptorHandle& handle) |
| 89 | { |
no outgoing calls
no test coverage detected