LukasBanana / LLGL

Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal
BSD 3-Clause "New" or "Revised" License
2.1k stars 139 forks source link

ResourceHeap should provide multiple sets of consecutive descriptors #49

Closed LukasBanana closed 4 years ago

LukasBanana commented 4 years ago

ResourceHeap currently only supports one set of resource views that are always bound at once. It should be extended to provide a functionality similar to the descriptor heap in D3D12, which stores an arbitrary number of descriptors in one heap. The number of resources that are bound with SetResourceHeap will depend on the pipeline layout of the actively bound pipeline state. SetResourceHeap should then have an optional parameter to specify the first resource within the heap. Moreover, the parameter firstSet should be moved into BindingDescriptor structure:

void SetResourceHeap(
    ResourceHeap&           resourceHeap,
    std::uint32_t           firstResource   = 0,
    const PipelineBindPoint bindPoint       = PipelineBindPoint::Undefined
);
LukasBanana commented 4 years ago

Implemented new interface of SetResourceHeap: