anv: Add allocator support for client-visible addresses

When a BO is flagged as having a client visible address, we put it in
its own heap.  We also support the client explicitly specifying an
address in said heap.  If an address collision happens, we return false
from anv_vma_alloc which turns into a VK_ERROR_OUT_OF_DEVICE_MEMORY.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Jason Ekstrand
2019-12-02 16:03:56 -06:00
parent 96e3328ac2
commit a8e59b3708
6 changed files with 107 additions and 10 deletions

View File

@@ -1911,6 +1911,7 @@ VkResult anv_ImportSemaphoreFdKHR(
VkResult result = anv_device_import_bo(device, fd,
ANV_BO_ALLOC_EXTERNAL |
ANV_BO_ALLOC_IMPLICIT_SYNC,
0 /* client_address */,
&new_impl.bo);
if (result != VK_SUCCESS)
return result;