lavapipe: report allocation-error

If we fail to create an image, we need to report this, otherwise we'll
start doing crazy stuff, like reporting a required size of zero.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10689>
This commit is contained in:
Erik Faye-Lund 2021-05-07 12:20:26 +02:00 committed by Marge Bot
parent 1a099cb90b
commit c688f8f8c5
1 changed files with 2 additions and 0 deletions

View File

@ -92,6 +92,8 @@ lvp_image_create(VkDevice _device,
image->bo = device->pscreen->resource_create_unbacked(device->pscreen,
&template,
&image->size);
if (!image->bo)
return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
}
*pImage = lvp_image_to_handle(image);