Skip to content

venus: make descriptor set allocation async

Yiwei Zhang requested to merge zzyiwei/mesa:async-set-alloc into main

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.

/cc @olv @ryanneph

Edited by Yiwei Zhang

Merge request reports