nvk: Return OUT_OF_DEVICE_MEMORY if bo_new fails
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Tue, 31 Jan 2023 02:11:55 +0000 (20:11 -0600)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:31:58 +0000 (21:31 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/vulkan/nvk_device_memory.c

index 1697701..b9eceda 100644 (file)
@@ -105,7 +105,7 @@ nvk_allocate_memory(struct nvk_device *device,
    }
    if (!mem->bo) {
       vk_object_free(&device->vk, pAllocator, mem);
-      return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
+      return vk_error(device, VK_ERROR_OUT_OF_DEVICE_MEMORY);
    }
 
    VkResult result;