Enhancement: Always Round Up For Unknown Suballocation Types #449
Labels
investigating
Still to be determined whether we work on this
quality
Code quality improvement e.g. refactoring
VmaBlockBufferImageGranularity::RoundupAllocRequest will cause an allocation to stretch to occupy the entirety of the buffer image granularity "slots" it is located in, if bufferimagegranularity is relatively small (less than 256 bytes).
This seems like a fine attitude for suballocations of type VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL, which may share "slots" with other suballocations of the same type. However, for types VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN and VMA_SUBALLOCATION_TYPE_UNKNOWN, the suballocations may never share their "slots" with other allocations under any circumstances. As a result, NOT stretching the suballocations doesn't really accomplish anything except add friction to locating a good spot to allocate and create "dead" free blocks that can't be used for anything. If many of these suballocation types exist, these dead blocks can add an inordinate amount of time to defragmentation passes.
Since the additional free blocks don't serve any purpose, I think that RoundUp should always round up for those two suballocation types when the granularity is >1.
The text was updated successfully, but these errors were encountered: