MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / Free

Method Free

SampleFramework12/v1.00/Graphics/GraphicsTypes.cpp:88–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void DescriptorHeap::Free(DescriptorHandle& handle)
89{
90 if(handle.IsValid() == false)
91 return;
92
93 #if UseAsserts_
94 Assert_(reinterpret_cast<const void*>(this) == handle.ParentHeap);
95 #endif
96
97 Assert_(Heap != nullptr);
98 Assert_(Allocated > 0);
99 Assert_(handle.CPUHandle.ptr >= CPUStart.ptr);
100 uint64 heapIdx = (handle.CPUHandle.ptr - CPUStart.ptr) / DescriptorSize;
101 Assert_(heapIdx < NumDescriptors);
102
103 DeadList[Allocated - 1] = uint32(heapIdx);
104 --Allocated;
105
106 handle = DescriptorHandle();
107}
108
109// == LinearDescriptorHeap ========================================================================
110

Callers 3

ShutdownMethod · 0.80
ResetMethod · 0.80
ShutdownMethod · 0.80

Calls 2

IsValidMethod · 0.80
DescriptorHandleClass · 0.70

Tested by

no test coverage detected