Skip to content

Enhancement: Always Round Up For Unknown Suballocation Types #449

Open
@CannibalVox

Description

@CannibalVox

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigatingStill to be determined whether we work on thisqualityCode quality improvement e.g. refactoring

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions