zink: add error for bo allocation failure

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13849>
This commit is contained in:
Mike Blumenkrantz 2021-11-17 13:22:39 -05:00 committed by Marge Bot
parent 83278b5661
commit 4fc216b4ba

View file

@ -272,8 +272,10 @@ bo_create_internal(struct zink_screen *screen,
}
VkResult ret = VKSCR(AllocateMemory)(screen->dev, &mai, NULL, &bo->mem);
if (!zink_screen_handle_vkresult(screen, ret))
if (!zink_screen_handle_vkresult(screen, ret)) {
mesa_loge("zink: couldn't allocate memory!");
goto fail;
}
simple_mtx_init(&bo->lock, mtx_plain);
pipe_reference_init(&bo->base.reference, 1);