aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_intel.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-05-30 15:34:25 -0700
committerJason Ekstrand <[email protected]>2018-06-01 14:27:10 -0700
commitb0d50247a7049350ef30adcefc609039ce86beee (patch)
tree327a448861a4dfe10aca0ee31d2984544666481e /src/intel/vulkan/anv_intel.c
parent27cc68d9e90c8d2031383fa6dc28fe910a351eb6 (diff)
anv/allocator: Set the BO flags in bo_cache_alloc/import
It's safer to set them there because we have the opportunity to properly handle combining flags if a BO is imported more than once. Reviewed-by: Scott D Phillips <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_intel.c')
-rw-r--r--src/intel/vulkan/anv_intel.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_intel.c b/src/intel/vulkan/anv_intel.c
index 7ddde70b9c4..431cef5c6ac 100644
--- a/src/intel/vulkan/anv_intel.c
+++ b/src/intel/vulkan/anv_intel.c
@@ -73,8 +73,12 @@ VkResult anv_CreateDmaBufImageINTEL(
image = anv_image_from_handle(image_h);
+ uint64_t bo_flags = 0;
+ if (device->instance->physicalDevice.supports_48bit_addresses)
+ bo_flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
+
result = anv_bo_cache_import(device, &device->bo_cache,
- pCreateInfo->fd, &mem->bo);
+ pCreateInfo->fd, bo_flags, &mem->bo);
if (result != VK_SUCCESS)
goto fail_import;
@@ -90,9 +94,6 @@ VkResult anv_CreateDmaBufImageINTEL(
goto fail_import;
}
- if (device->instance->physicalDevice.supports_48bit_addresses)
- mem->bo->flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
-
image->planes[0].address = (struct anv_address) {
.bo = mem->bo,
.offset = 0,