public void Release(DescriptorTablePoolEntry entry) { // TODO: Do garbage collection // https://github.com/DiligentGraphics/DiligentCore/blob/109a75aac22463802f03dfc6588951ed0b04892a/Graphics/GraphicsTools/include/VariableSizeAllocationsManager.h _entries.Remove(entry.HeapIndex); }
public DescriptorTablePoolEntry Reserve(int descriptorCount) { if (_nextDescriptorIndex + descriptorCount > _maxEntries) { throw new InvalidOperationException(); } var result = new DescriptorTablePoolEntry( _nextDescriptorIndex, descriptorCount, _descriptorHeap.GPUDescriptorHandleForHeapStart + (_incrementSize * _nextDescriptorIndex), _descriptorHeap.CPUDescriptorHandleForHeapStart + (_incrementSize * _nextDescriptorIndex), _incrementSize); _entries[_nextDescriptorIndex] = result; _nextDescriptorIndex += descriptorCount; return(result); }