vulkan/overlay: check return value of swapchain get images
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sat, 16 Mar 2019 18:51:49 +0000 (18:51 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 22 Mar 2019 11:26:01 +0000 (11:26 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/vulkan/overlay-layer/overlay.cpp

index bf384747425a30e351fa7347b1ab85656cf115c6..edaad969e20e000ae264c474de80dd7f8e7550be 100644 (file)
@@ -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 = {};