anv: Implement VK_KHR_buffer_device_address
This MR implements the newly released VK_KHR_buffer_device extension. Even though this extension is, in theory, just the KHRification of the similarly named EXT extension, it ended up being an annoying amount of work to implement. The primary difference between the KHR and the EXT was the addition of trace and replay addresses per VkDeviceMemory
object as opposed to per VkBuffer
. This was added to support trace and replay on implementations with a non-sparse binding model such as ANV. Most of the churn in this patch series is support for replay. Generally, this falls into two buckets:
-
Reworking of the VF cache invalidation workaround on gen8-9 to track bound vertex buffer addresses and emit
PIPE_CONTROL
s rather than shoving all vertex buffers into the bottom 4 GiB of the address space. We need to do this because we have to separate out everything which uses buffer device address into its own heap to avoid address space collisions on replay. This isn't compatible with having to shove them in the bottom 4 GiB of the address space. Unfortunately, we have to support buffer device address on vertex buffers so we couldn't just make them mutually exclusive. -
Shuffling some of the heap and VMA allocation code around to make VMA allocation separate from the heaps. Buffer device address memory is going in its own VMA heap but not its own heap from the API perspective. In theory, we could give it its own API heap but there's not a lot of point to doing so.
The last few patches just add the bits of plumbing to actually wire up the extension.