venus: make descriptor set allocation async
The 1~2 commits are just preparation code refactoring without behavior changes.
The 3~6 commits are to track necessary info in different structs for later accounting.
The 7th commit tracks used resources and return VK_ERROR_OUT_OF_POOL_MEMORY
when pool resources are drained.
The 8th commit conditionally enables async set allocation when VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT
is not set.
Tested with:
dEQP-VK.api.descriptor*
dEQP-VK.api.object_management.*
dEQP-VK.binding_model.descriptor*
dEQP-VK.descriptor_indexing.*
Win:
- 4~5 FPS gain for Roblox, which is necessary for us to hit 30 eventually.
Follow up:
- Re-evaluate and fix async pool creation v.s.
maxUpdateAfterBindDescriptorsInAllPools
physical device limit which can be offended at runtime. - Log some warnings on the renderer side if the allocation failed on a pool without
VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT
bit.
Edited by Yiwei Zhang