Class Allocation

Synopsis

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

class Allocation

Description

No description yet.

Methods

~Allocation
getCpuHandle
getGpuHandle
getHeapEntryIndex

Source

Lines 60-78 in Source/Falcor/Core/API/D3D12/D3D12DescriptorHeap.h.

class Allocation
{
public:
    using SharedPtr = std::shared_ptr<Allocation>;
    ~Allocation();
    uint32_t getHeapEntryIndex(uint32_t index) const { assert(index < mDescCount); return index + mBaseIndex; }
    CpuHandle getCpuHandle(uint32_t index) const { return mpHeap->getCpuHandle(getHeapEntryIndex(index)); } // Index is relative to the allocation
    GpuHandle getGpuHandle(uint32_t index) const { return mpHeap->getGpuHandle(getHeapEntryIndex(index)); } // Index is relative to the allocation

private:
    friend D3D12DescriptorHeap;
    static SharedPtr create(D3D12DescriptorHeap::SharedPtr pHeap, uint32_t baseIndex, uint32_t descCount, std::shared_ptr<Chunk> pChunk);
    Allocation(D3D12DescriptorHeap::SharedPtr pHeap, uint32_t baseIndex, uint32_t descCount, std::shared_ptr<Chunk> pChunk);
    D3D12DescriptorHeap::SharedPtr mpHeap;
    uint32_t mBaseIndex;
    uint32_t mDescCount;
    std::shared_ptr<Chunk> mpChunk;
};





Add Discussion as Guest

Log in