Mateusz Kielan
Mateusz Kielan
> Note: Immutable samplers are kept alive by IGPUDescriptorSetLayout via the SBinding::samplers member. Correct. > IGPUDescriptorSetLayout in turn is kept alive by the IGPUDescriptorSet, so nothing needs to be done...
> Sidenote: [This](https://github.com/Devsh-Graphics-Programming/Nabla/blob/c009091c572c4beaa587f4dff7b343a7ad67a843/include/nbl/asset/IDescriptorSet.h#L54) should be a raw pointer because SImageInfo is a throw-away structure mainly used to update the descriptor sets and AFAICT we don't care about lifetime there. No...
> we can figure out the exact number of descriptors, of each type, that the set can ever use and that need to be allocated from the dynamic arrays stored...
> Descriptor set allocation failure **due to fragmentation** should **not** happen if: > > * Descriptor pool is not created with the `VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT` bit set. This is trivial to satisfy,...
> * Descriptor pool is created with the `VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT` bit set **BUT** it has not had any descriptor sets freed since it was created or most recently reset. This is...
> * If all sets allocated from the pool since it was created or most recently reset use the same number of descriptors (of each type) and the requested allocation...
> When creating a IGPUDescriptorSet iterate through the given IGPUDescriptorSetLayout's bindings and depending on the descriptor type reserve space in the parent descriptor pool's descriptor storage (see Open Question 1...
> ### Required (and Foreseeable) Modifications to the OpenGL Backend > > 1. Currently, the storage of `smart_refctd_ptr` comes from `COpenGLDescriptorSet` in the form of `refctd_dynamic_array`s for each descriptor type....
> ### Special Flags (_TODO_) My idea is to have a revision atomic counter which is incremented each time a descriptor binding with **neither** AFTER_BIND or WHILE_PENDING flag is updated....
> Until we update a descriptor set we don't have the actual ref_ctd_ptr to resources that need to go into the pool's dynamic arrays, that means we need a way...