- minImageCount is the minimum number of presentable images that the application needs.
The implementation will either create the swapchain with at least that many images,
or it will fail to create the swapchain.
Change-Id: I1711c50456fd3487a495497bfd526ca9bf30d308
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
error = chain->get_buffers(device, chain, &buffers, &chain->buffer_count);
VK_CHECK(error == VK_SUCCESS, goto done, "swapchain backend get buffers failed.\n");
+ VK_CHECK(chain->buffer_count >= info->minImageCount, goto error_mem_alloc,
+ "Insufficient buffer_count(%d >= %d)\n", chain->buffer_count, info->minImageCount);
chain->buffers = vk_alloc(allocator, chain->buffer_count * sizeof(vk_buffer_t),
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);