From: Lionel Landwerlin Date: Sat, 16 Mar 2019 18:51:49 +0000 (+0000) Subject: vulkan/overlay: check return value of swapchain get images X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f3727351dd5d6670c54cca12ae03ccdf5b4f440;p=mesa.git vulkan/overlay: check return value of swapchain get images Signed-off-by: Lionel Landwerlin Reviewed-by: Tapani Pälli --- diff --git a/src/vulkan/overlay-layer/overlay.cpp b/src/vulkan/overlay-layer/overlay.cpp index bf384747425..edaad969e20 100644 --- a/src/vulkan/overlay-layer/overlay.cpp +++ b/src/vulkan/overlay-layer/overlay.cpp @@ -1255,18 +1255,21 @@ static void setup_swapchain_data(struct swapchain_data *data, setup_swapchain_data_pipeline(data); - device_data->vtable.GetSwapchainImagesKHR(device_data->device, - data->swapchain, - &data->n_images, - NULL); + err = device_data->vtable.GetSwapchainImagesKHR(device_data->device, + data->swapchain, + &data->n_images, + NULL); + check_vk_result(err); + data->images = ralloc_array(data, VkImage, data->n_images); data->image_views = ralloc_array(data, VkImageView, data->n_images); data->framebuffers = ralloc_array(data, VkFramebuffer, data->n_images); - device_data->vtable.GetSwapchainImagesKHR(device_data->device, - data->swapchain, - &data->n_images, - data->images); + err = device_data->vtable.GetSwapchainImagesKHR(device_data->device, + data->swapchain, + &data->n_images, + data->images); + check_vk_result(err); /* Image views */ VkImageViewCreateInfo view_info = {};