radv: fix the error code when allocating a fresh imported syncobj fails
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 14 Jul 2020 21:15:55 +0000 (23:15 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 16 Jul 2020 21:04:37 +0000 (21:04 +0000)
It can only be an OOM error.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5921>

src/amd/vulkan/radv_device.c

index d69ad9d0b619b634e6618b7991713fcd674d181e..5a1a67288d3d9e0474fb4016a18e7b6cc30916d1 100644 (file)
@@ -7064,7 +7064,7 @@ static VkResult radv_import_sync_fd(struct radv_device *device,
        if (!syncobj_handle) {
                int ret = device->ws->create_syncobj(device->ws, &syncobj_handle);
                if (ret) {
-                       return vk_error(device->instance, VK_ERROR_INVALID_EXTERNAL_HANDLE);
+                       return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
                }
        }