// TODOs:
//
// - Implement a check for validity language that reads: All uses of
- // presentable images acquired from pname:swapchain and owned by the
- // application must: have completed execution
+ // presentable images acquired from pname:swapchain must: have completed
+ // execution
bool skipCall = false;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
loader_platform_thread_lock_mutex(&globalLock);
for (uint32_t i = 0; i < *pSwapchainImageCount; i++) {
pSwapchain->images[i].image = pSwapchainImages[i];
pSwapchain->images[i].pSwapchain = pSwapchain;
- pSwapchain->images[i].ownedByApp = false;
+ pSwapchain->images[i].acquiredByApp = false;
}
}
}
uint32_t minImageCount = pPhysicalDevice->surfaceCapabilities.minImageCount;
uint32_t imagesAcquiredByApp = 0;
for (uint32_t i = 0; i < pSwapchain->imageCount; i++) {
- if (pSwapchain->images[i].ownedByApp) {
+ if (pSwapchain->images[i].acquiredByApp) {
imagesAcquiredByApp++;
}
}
// Obtain this pointer again after locking:
pSwapchain = &my_data->swapchainMap[swapchain];
if (((result == VK_SUCCESS) || (result == VK_SUBOPTIMAL_KHR)) && pSwapchain) {
- // Change the state of the image (now owned by the application):
- pSwapchain->images[*pImageIndex].ownedByApp = true;
+ // Change the state of the image (now acquired by the application):
+ pSwapchain->images[*pImageIndex].acquiredByApp = true;
}
loader_platform_thread_unlock_mutex(&globalLock);
return result;
"images in this VkSwapchainKHR.\n",
__FUNCTION__, index, pSwapchain->imageCount);
} else {
- if (!pSwapchain->images[index].ownedByApp) {
+ if (!pSwapchain->images[index].acquiredByApp) {
skipCall |= LOG_ERROR(VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, pPresentInfo->pSwapchains[i],
"VkSwapchainKHR", SWAPCHAIN_INDEX_NOT_IN_USE, "%s() returned an index (i.e. %d) "
- "for an image that is not owned by "
+ "for an image that is not acquired by "
"the application.",
__FUNCTION__, index);
}
int index = pPresentInfo->pImageIndices[i];
SwpSwapchain *pSwapchain = &my_data->swapchainMap[pPresentInfo->pSwapchains[i]];
if (pSwapchain) {
- // Change the state of the image (no longer owned by the
+ // Change the state of the image (no longer acquired by the
// application):
- pSwapchain->images[index].ownedByApp = false;
+ pSwapchain->images[index].acquiredByApp = false;
}
}
}
SWAPCHAIN_DESTROY_SWAP_DIFF_DEVICE, // Called vkDestroySwapchainKHR() with a different VkDevice than vkCreateSwapchainKHR()
SWAPCHAIN_APP_ACQUIRES_TOO_MANY_IMAGES, // vkAcquireNextImageKHR() asked for more images than are available
SWAPCHAIN_INDEX_TOO_LARGE, // Index is too large for swapchain
- SWAPCHAIN_INDEX_NOT_IN_USE, // vkQueuePresentKHR() given index that is not owned by app
+ SWAPCHAIN_INDEX_NOT_IN_USE, // vkQueuePresentKHR() given index that is not acquired by app
SWAPCHAIN_BAD_BOOL, // VkBool32 that doesn't have value of VK_TRUE or VK_FALSE (e.g. is a non-zero form of true)
SWAPCHAIN_INVALID_COUNT, // Second time a query called, the pCount value didn't match first time
SWAPCHAIN_WRONG_STYPE, // The sType for a struct has the wrong value
// Corresponding VkSwapchainKHR (and info) to this VkImage:
SwpSwapchain *pSwapchain;
- // true if application got this image from vkAcquireNextImageKHR(), and
- // hasn't yet called vkQueuePresentKHR() for it; otherwise false:
- bool ownedByApp;
+ // true if application acquired this image from vkAcquireNextImageKHR(),
+ // and hasn't yet called vkQueuePresentKHR() for it; otherwise false:
+ bool acquiredByApp;
};
// Create one of these for each VkSwapchainKHR within a VkDevice: