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:
parent
1a099cb90b
commit
c688f8f8c5
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue