anv: intel: add softpin flag on imported BOs
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 4 Jun 2018 08:54:29 +0000 (09:54 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 5 Jun 2018 13:18:35 +0000 (14:18 +0100)
Looks like we forgot to update this bit of the driver for softpin.

Fixes: 4affeba1e9eb42 ("anv: Soft-pin everything else")
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_intel.c

index 431cef5c6ac1fbcb7675ff0aadefc3b4d36f4f0f..06db5787a9c83778b900b226afbb3536514e4014 100644 (file)
@@ -76,6 +76,8 @@ VkResult anv_CreateDmaBufImageINTEL(
    uint64_t bo_flags = 0;
    if (device->instance->physicalDevice.supports_48bit_addresses)
       bo_flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
+   if (device->instance->physicalDevice.use_softpin)
+      bo_flags |= EXEC_OBJECT_PINNED;
 
    result = anv_bo_cache_import(device, &device->bo_cache,
                                 pCreateInfo->fd, bo_flags, &mem->bo);