anv: Do not sample from 3d depth image with HiZ
[mesa.git] / src / intel / vulkan / anv_intel.c
index e68a6897e6245e536129fca14015614f003937c6..23489c011a1fb755afd5e320cf3bea33753674b0 100644 (file)
@@ -72,26 +72,21 @@ 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;
-   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);
+   result = anv_device_import_bo(device, pCreateInfo->fd,
+                                 ANV_BO_ALLOC_IMPLICIT_SYNC,
+                                 0 /* address */,
+                                 &mem->bo);
    if (result != VK_SUCCESS)
       goto fail_import;
 
    VkDeviceSize aligned_image_size = align_u64(image->size, 4096);
 
    if (mem->bo->size < aligned_image_size) {
-      result = vk_errorf(device->instance, device,
-                         VK_ERROR_INVALID_EXTERNAL_HANDLE,
+      result = vk_errorf(device, device, VK_ERROR_INVALID_EXTERNAL_HANDLE,
                          "dma-buf too small for image in "
                          "vkCreateDmaBufImageINTEL: %"PRIu64"B < %"PRIu64"B",
                          mem->bo->size, aligned_image_size);
-      anv_bo_cache_release(device, &device->bo_cache, mem->bo);
+      anv_device_release_bo(device, mem->bo);
       goto fail_import;
    }