News: 0001473967

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Vulkan Sparse Binding Support Comes To Lavapipe Software Driver

([Mesa] 5 Hours Ago Vulkan Sparse + Lavapipe)


Merged into Mesa 24.2 on Thursday is Vulkan sparse binding support for the CPU-based Lavapipe driver.

Building off the work started by David Airlie, Konstantin Seurer has managed to get the Vulkan sparse support for Lavapipe over the finish line. This sparse binding support for Lavapipe should open up this CPU-based driver to handling more Vulkan games/applications, but not that the performance will necessarily be good.

David Airlie back in May 2023 explained in [1]a blog post about the challenges of sparse memory support for a CPU-based Vulkan driver:

"Sparse binding essentially allows creating a vulkan buffer/image of a certain size, then plugging in chunks of memory to back it in page-size multiple chunks.

This works great with GPU APIs where we've designed this, but it's actually hard to pull off on the CPU.

Currently lavapipe allocates memory with an aligned malloc. It allocates objects with no backing and non-sparse bindings connect objects to the malloced memory.

However with sparse objects, the object creation should allocate a chunk of virtual memory space, then sparse binding should bind allocated device memory into the virtual memory space. Except Linux has no interfaces for doing this without using a file descriptor."

[2]This merge request after being under review over the past month has managed to push sparse support across the finish line for Lavapipe. It's great seeing this CPU-based, hardware independent software implementation of the Vulkan API continuing to advance even for complex features.

This Lavapipe sparse support will be found in Mesa 24.2 due for release as stable in August.



[1] https://airlied.blogspot.com/2023/05/lavapipe-and-sparse-memory-bindings.html

[2] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408



phoronix

You will be honored for contributing your time and skill to a worthy cause.