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

Support sparse binding #2360

Open
Rua opened this issue Oct 17, 2023 · 1 comment
Open

Support sparse binding #2360

Rua opened this issue Oct 17, 2023 · 1 comment

Comments

@Rua
Copy link
Contributor

Rua commented Oct 17, 2023

A long-standing missing feature. Some of the basic logic is currently there, but a lot more is needed. In particular:

  • Buffer and image state tracking needs to track what memory is bound where at any given time. Not just for validation purposes, but also to keep the memory allocations alive.
  • When submitting a command buffer, checks should be performed to ensure that all the accessed regions of buffers and images in that command buffer have memory bound to them. This needs to take into account sync ordering (sparse binds are not ordered unless synced with semaphores).
  • How should sparse binding interact with subbuffers?
  • How to deal with host access? Sparse memory is not contiguous, so the current read and write methods, which return a slice, don't work.
@LDeakin
Copy link

LDeakin commented Sep 12, 2024

I have been using sparse images with vulkano where I manually manage allocations and binding. I had to make a few small changes to vulkano though:

  • Uncomment ImageCreateFlags::SPARSE_BINDING etc
  • Make Image::from_raw() public
  • Make RawImage::get_sparse_memory_requirements() public

Would you accept a PR with such changes? I recognise that this does not actually help with adding safe sparse image support to vulkano, but it is enough for my use case.

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

No branches or pull requests

2 participants