Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace gpu-alloc with gpu-allocator for vulkan. #7042

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

Elabajaba
Copy link
Contributor

Connections
Closes #5925

Description
TODO

Examples run, but there's a bunch of TODOs that need to be fixed.

  • Move the gpu_allocator error impl somewhere else so it can be shared between both the dx12 and vulkan implementations
  • Figure out map_buffer and unmap_buffer
  • Do the allocations need to be wrapped in a mutex like they were when using gpu_alloc? I didn't because DX12 hal doesn't, but is that due to reference counted COM stuff?
  • Clean up the allocator on drop.
  • Decide if they're called block or allocation and use it consistently
  • How do I know if it's a linear or tiling texture for the allocation description? (also, is the RT acceleration structure linear or tiling?)
  • Misc cleanup

Testing
WIP

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@nical
Copy link
Contributor

nical commented Jan 31, 2025

Thanks for looking into this. Switching should wait for the next version of gpu_allocator to be released, because the current version doesn't support progressively growing the memory chunk size (which gpu-alloc does), and has a bug causing it to always use huge memory chunks instead of honoring AllocatorCreateDesc::allocation_sizes. Both of which were fixed in Traverse-Research/gpu-allocator#254.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch the Vulkan backend from gpu_alloc to gpu_allocator.
2 participants