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 <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17995>
This commit is contained in:

committed by
Marge Bot

parent
fddb4eda2f
commit
adb4934d59
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user