radv: fix error code when resizing the upload BO
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 6 Sep 2017 13:24:49 +0000 (15:24 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 6 Sep 2017 13:52:19 +0000 (15:52 +0200)
malloc() failures are unrelated to the device memory.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index 4766b115dc9a44632a369aabb716017be12f3658..b3721237ab8a37444b7238c89118f0d5ff05c72d 100644 (file)
@@ -271,7 +271,7 @@ radv_cmd_buffer_resize_upload_buf(struct radv_cmd_buffer *cmd_buffer,
                upload = malloc(sizeof(*upload));
 
                if (!upload) {
-                       cmd_buffer->record_result = VK_ERROR_OUT_OF_DEVICE_MEMORY;
+                       cmd_buffer->record_result = VK_ERROR_OUT_OF_HOST_MEMORY;
                        device->ws->buffer_destroy(bo);
                        return false;
                }