anv: Flag semaphore BOs as external
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 26 Oct 2018 18:36:01 +0000 (13:36 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 27 Oct 2018 05:02:32 +0000 (00:02 -0500)
It probably doesn't actually break anything but it does cause some
assertions in debug builds.

Fixes: 7a89a0d9edae6 "anv: Use separate MOCS settings for external BOs"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_queue.c

index 6247ba8751e1fc3d24115284d730468067ab91b5..76a0a10e2503a5251a9411c9fcc58fe4cc4a30a5 100644 (file)
@@ -962,7 +962,7 @@ VkResult anv_CreateSemaphore(
       } else {
          semaphore->permanent.type = ANV_SEMAPHORE_TYPE_BO;
          VkResult result = anv_bo_cache_alloc(device, &device->bo_cache,
-                                              4096, 0,
+                                              4096, ANV_BO_EXTERNAL,
                                               &semaphore->permanent.bo);
          if (result != VK_SUCCESS) {
             vk_free2(&device->alloc, pAllocator, semaphore);
@@ -1111,7 +1111,8 @@ VkResult anv_ImportSemaphoreFdKHR(
          new_impl.type = ANV_SEMAPHORE_TYPE_BO;
 
          VkResult result = anv_bo_cache_import(device, &device->bo_cache,
-                                               fd, 0, &new_impl.bo);
+                                               fd, ANV_BO_EXTERNAL,
+                                               &new_impl.bo);
          if (result != VK_SUCCESS)
             return result;