uint32_t i;
vk_icd_t *icd = vk_get_icd();
VkResult res = VK_SUCCESS;
+ VkPresentRegionsKHR *region_info = NULL;
+ const VkPresentRegionKHR *regions = NULL;
for (i = 0; i < info->swapchainCount; i++) {
int sync_fd = -1;
if (res != VK_SUCCESS)
VK_ERROR("Failed to queue_signal_release_image. res(%d)", res);
+
+ region_info = info->pNext;
+ if (region_info) {
+ if (VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR != region_info->sType || region_info->swapchainCount <= 0) {
+ VK_ERROR("issue in using extension (%s)", VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME);
+ res = VK_ERROR_DEVICE_LOST;//TODO return proper error code
+ }
+
+ if (VK_SUCCESS == res) {
+ regions = region_info->pRegions;
+ }
+
+ }
res = chain->present_image(queue, chain,
- chain->buffers[info->pImageIndices[i]].tbm, sync_fd);
+ chain->buffers[info->pImageIndices[i]].tbm, sync_fd, regions ? regions->rectangleCount : 0, regions ? regions->pRectangles : NULL);
if (info->pResults != NULL)
info->pResults[i] = res;