| 58 | } |
| 59 | |
| 60 | donut::engine::DescriptorTableManager::DescriptorTableManager(nvrhi::IDevice* device, nvrhi::IBindingLayout* layout) |
| 61 | : m_Device(device) |
| 62 | { |
| 63 | m_DescriptorTable = m_Device->createDescriptorTable(layout); |
| 64 | |
| 65 | size_t capacity = m_DescriptorTable->getCapacity(); |
| 66 | m_AllocatedDescriptors.resize(capacity); |
| 67 | m_Descriptors.resize(capacity); |
| 68 | memset(m_Descriptors.data(), 0, sizeof(nvrhi::BindingSetItem) * capacity); |
| 69 | } |
| 70 | |
| 71 | donut::engine::DescriptorIndex donut::engine::DescriptorTableManager::CreateDescriptor(nvrhi::BindingSetItem item) |
| 72 | { |