What is the memory footprint of a descriptor heap?

67 views Asked by At

Let say I want to create a descriptor heap of given type and capacity:

void CreateHeap(ID3D12DescriptorHeap** destBuffer, D3D12_DESCRIPTOR_HEAP_TYPE descType, UINT capacity)
{
    D3D12_DESCRIPTOR_HEAP_DESC heapDesc = {};
    heapDesc.NumDescriptors = capacity;
    heapDesc.Type = descType;

    if (descType == D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV)
        heapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
    else
        heapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE;

    const HRESULT hr = D3D12Device->CreateDescriptorHeap(&heapDesc, IID_PPV_ARGS(destBuffer));
    assert(SUCCEEDED(hr));
    (*destBuffer)->SetName(L"My Descriptor Heap");

    const UINT descriptorSize = D3D12Device->GetDescriptorHandleIncrementSize(descType);
    std::cout << " Descriptor handle increment size:" << descriptorSize << std::endl;
}

The value returned by GetDescriptorHandleIncrementSize is 152 which seems to be too huge.
What is the memory footprint of a descriptor heap? I checked on PIX but the information is not there:

enter image description here

0

There are 0 answers