This is the next step toward reducing the number of descriptor pools, since we will not need a pool per frame anymore. By tracking which descriptor bound to which frame we can reuse descriptor sets from the same pool for different frames: If we have a descriptor set which is good for our needs we can check if it's available to use or it's still used in a previous frame and we need to create a new one.
The current solution is only applied to one descriptor group (per draw descriptor sets), but we can easily apply it to the other groups as well.
This is the next step toward reducing the number of descriptor pools, since we will not need a pool per frame anymore. By tracking which descriptor bound to which frame we can reuse descriptor sets from the same pool for different frames: If we have a descriptor set which is good for our needs we can check if it's available to use or it's still used in a previous frame and we need to create a new one.
The current solution is only applied to one descriptor group (per draw descriptor sets), but we can easily apply it to the other groups as well.