[Mesa-dev] [PATCH] radv: fix error code when resizing the upload BO

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Wed Sep 6 13:36:27 UTC 2017


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Wed, Sep 6, 2017, at 15:24, Samuel Pitoiset wrote:
> malloc() failures are unrelated to the device memory.
> 
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/amd/vulkan/radv_cmd_buffer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/amd/vulkan/radv_cmd_buffer.c
> b/src/amd/vulkan/radv_cmd_buffer.c
> index 774879e0fd..ed2984eb5a 100644
> --- a/src/amd/vulkan/radv_cmd_buffer.c
> +++ b/src/amd/vulkan/radv_cmd_buffer.c
> @@ -272,7 +272,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;
>  		}
> -- 
> 2.14.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list