Intel's ANV Vulkan Driver Overhauls Its Buffer Allocation Code
With Mesa 19.3 having been branched yesterday, hitting Git master today as an early change for Mesa 20.0 is an overhaul to the Intel "ANV" open-source Vulkan driver's buffer object (BO) allocation code.
The set of patches by Jason Ekstrand, one of Intel's original ANV Vulkan driver developers, changes their allocation code around so that now everything is allocated from the buffer object cache. With this fundamental change all allocations are within a single sparse array struct. This change ensures relocation updates can't crash, moving from a hash set to sparse array for buffer object tracking should be much faster ("this will be much more performant," says Jason), allows a lock in their softpin code to be removed, and is a code clean-up itself. With this change the Intel Vulkan driver is also zeroing out buffers on release to ensure the memory is cleared.
With the change over to using a bitset for residency tracking, Ekstrand found it helped take 3% off a CPU-limited Dawn WebGPU example.
All the details on this Intel Vulkan driver BO allocation change can be found via this merge request, which was honored today and now part of Mesa 20.0.0-devel.
The set of patches by Jason Ekstrand, one of Intel's original ANV Vulkan driver developers, changes their allocation code around so that now everything is allocated from the buffer object cache. With this fundamental change all allocations are within a single sparse array struct. This change ensures relocation updates can't crash, moving from a hash set to sparse array for buffer object tracking should be much faster ("this will be much more performant," says Jason), allows a lock in their softpin code to be removed, and is a code clean-up itself. With this change the Intel Vulkan driver is also zeroing out buffers on release to ensure the memory is cleared.
With the change over to using a bitset for residency tracking, Ekstrand found it helped take 3% off a CPU-limited Dawn WebGPU example.
All the details on this Intel Vulkan driver BO allocation change can be found via this merge request, which was honored today and now part of Mesa 20.0.0-devel.
Add A Comment