Skip to content

Allocator type is quite large #159

@i509VCB

Description

@i509VCB

The allocator type is quite large. This is due to holding a ash::Device.

Summary of -Z print-type-sizes (cargo +nightly rustc -- -Z print-type-sizes):

print-type-size type: `gpu_allocator::vulkan::Allocator`: 1552 bytes, alignment: 8 bytes
print-type-size     field `.device`: 1488 bytes
print-type-size     field `.buffer_image_granularity`: 8 bytes
print-type-size     field `.memory_types`: 24 bytes
print-type-size     field `.memory_heaps`: 24 bytes
print-type-size     field `.debug_settings`: 6 bytes
print-type-size     end padding: 2 bytes

A possible solution could be to hold an ash::vk::Device handle and then load the function pointers the allocator uses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions