diff options
author | Lionel Landwerlin <[email protected]> | 2019-03-16 18:51:49 +0000 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-03-22 11:26:01 +0000 |
commit | 9f3727351dd5d6670c54cca12ae03ccdf5b4f440 (patch) | |
tree | 3a9cbca299f9663de3b516b94fb66243bcd11724 | |
parent | 1fbf355597e68f84a353b2d584b476864b22762a (diff) |
vulkan/overlay: check return value of swapchain get images
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
-rw-r--r-- | src/vulkan/overlay-layer/overlay.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
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 = {}; |