Function allocateDescriptors

Synopsis

#include <Source/Falcor/Core/API/D3D12/D3D12DescriptorHeap.h>

Allocation::SharedPtr allocateDescriptors(uint32_t count)

Description

No description yet.

Source

Lines 81-96 in Source/Falcor/Core/API/D3D12/D3D12DescriptorHeap.cpp. Line 80 in Source/Falcor/Core/API/D3D12/D3D12DescriptorHeap.h.

D3D12DescriptorHeap::Allocation::SharedPtr D3D12DescriptorHeap::allocateDescriptors(uint32_t count)
{
    if (setupCurrentChunk(count) == false) return nullptr;
    if (mpCurrentChunk->chunkCount * kDescPerChunk - mpCurrentChunk->currentDesc < count)
    {
        return nullptr;
    }
    Allocation::SharedPtr pAlloc = Allocation::create(shared_from_this(), mpCurrentChunk->getCurrentAbsoluteIndex(), count, mpCurrentChunk);
    // Update the chunk
    mpCurrentChunk->allocCount++;
    mpCurrentChunk->currentDesc += count;
    return pAlloc;
}





Add Discussion as Guest

Log in to DocsForge