anv: Move close(fd) from anv_bo_cache_import to its callers (v2)
This will allow us to implement VK_ANDROID_native_buffer without dup'ing the fd. We must close the fd in VK_KHR_external_memory_fd, but we should not in VK_ANDROID_native_buffer. v2: - Add missing close(fd) for case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR, subcase ANV_SEMAPHORE_TYPE_BO. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -71,6 +71,8 @@ VkResult anv_CreateDmaBufImageINTEL(
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail;
|
||||
|
||||
close(pCreateInfo->fd);
|
||||
|
||||
image = anv_image_from_handle(image_h);
|
||||
|
||||
result = anv_bo_cache_import(device, &device->bo_cache,
|
||||
|
Reference in New Issue
Block a user