Skip to content

WIP: anv: Use VM_BIND to avoid passing everything to the kernel every draw

Faith Ekstrand requested to merge gfxstrand/mesa:wip/anv-vm-bind into main

Thanks to descriptor indexing, our Vulkan driver currently has to pass the entire list of every BO ever allocated to the kernel on every vkQueueSubmit call. With the up-and-coming VM_BIND ioctl, this will no longer be needed because we can bind things to our VA space independently of execbuf. In theory, this should eventually let us significantly reduce our kernel CPU overhead to the point where execbuf becomes a smallish O(1) operation (in terms of buffers; still O(n) for sync objects). There's quite a bit of i915 work between here and there but getting VM_BIND in place is the first step.

This is also the first step towards implementing sparse binding support in ANV. However, I wanted to get the initial patches to use VM_BIND out in the open in the hopes that it will help the kernel interface move along.

Merge request reports