From adb4934d59c3b0e3d61326965e973f63ac4a3cfc Mon Sep 17 00:00:00 2001 From: Friedrich Vock Date: Wed, 10 Aug 2022 21:22:43 +0200 Subject: [PATCH] radv/winsys: Return VK_ERROR_INVALID_EXTERNAL_HANDLE if buffer imports fail Section 11.2.6 of the Vulkan spec states: "Importing memory from a particular host pointer may not be possible due to additional platform-specific restrictions beyond the scope of this specification in which case the implementation must fail the memory import operation with the error code VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR." Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c index b246e52d1ce..646e9982b99 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c @@ -622,7 +622,7 @@ radv_amdgpu_winsys_bo_from_ptr(struct radeon_winsys *_ws, void *pointer, uint64_ return VK_ERROR_OUT_OF_HOST_MEMORY; if (amdgpu_create_bo_from_user_mem(ws->dev, pointer, size, &buf_handle)) { - result = VK_ERROR_OUT_OF_DEVICE_MEMORY; + result = VK_ERROR_INVALID_EXTERNAL_HANDLE; goto error; }