Skip to content

Changes to PFN_vmaAllocateDeviceMemoryFunction #417

Open
@debaetsd

Description

@debaetsd

I modified the Allocate callback (VmaDeviceMemoryCallbacks) of our local copy to include additional information about the used VmaPool and dedicated allocations.
The signature is now basically

typedef void (VKAPI_PTR* PFN_vmaAllocateDeviceMemoryFunction)(
    VmaAllocator VMA_NOT_NULL                    allocator,
    uint32_t                                     memoryType,
    VkDeviceMemory VMA_NOT_NULL_NON_DISPATCHABLE memory,
    VkDeviceSize                                 size,
    VmaPool VMA_NULLABLE                         pool,
    bool                                         isDedicated,
    void* VMA_NULLABLE                           pUserData);

This requires some data pipelining (aka making sure the new parameters are available at the call site) but nothing all to crazy.
We have done this to improve statistic tracking and simplify interop tracking.

Ideally we would like to upstream this change (so we do not have to keep a fork).
Is this something you would be willing to accept? We can make the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureAdding new featurewontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions