Skip to content

dzn: Rework the descriptor pool/heap management logic

Boris Brezillon requested to merge dzn-desc-pool into dozen

The current implementation is sub-optimal in several ways:

  • We allocate new GPU SRV_UAV_CBV/SAMPLER heaps every time the pipeline/desc state is dirty which forces heap switches and might also use more memory if the number of descriptors is small (the granularity being the GPU page size, which can be 4kB or 64kB)
  • CPU descriptor heaps are not returned to the pool, when descriptors sets are freed, which makes set re-allocation slower
  • RTV/DSV descriptors can be duplicated, because we don't check if a similar view desc hasn't been used by a previous the command recorded to the same command buffer.

This series tries to address those problem, and, as a bonus, allows us to get rid of the dependency we have on d3d12_descriptor_pool (not like we couldn't live with this dependency, but that removes some external changes we needed to upstream dozen).

/cc @lfrb

Originally posted here.

Edited by Boris Brezillon

Merge request reports