aboutsummaryrefslogtreecommitdiff
path: root/layers/swapchain.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-10-12 13:27:13 +1300
committerChris Forbes <chrisforbes@google.com>2016-11-22 11:45:12 +1300
commit3b11cb7ae4ecfdaf5b57e70d1977577419f0685c (patch)
tree026ce0154848806f9c391bd5208bae5abe2ad800 /layers/swapchain.cpp
parent0ce6d00e0853606345712c0b277c9bfc74454bd9 (diff)
downloadusermoji-3b11cb7ae4ecfdaf5b57e70d1977577419f0685c.tar.xz
layers: Move too many images case to CV
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/swapchain.cpp')
-rw-r--r--layers/swapchain.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp
index 32c41ee0..2f0f64e5 100644
--- a/layers/swapchain.cpp
+++ b/layers/swapchain.cpp
@@ -1526,30 +1526,6 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR(VkDevice device, VkSwapchainK
auto it = my_data->swapchainMap.find(swapchain);
pSwapchain = (it == my_data->swapchainMap.end()) ? NULL : &it->second;
}
- SwpPhysicalDevice *pPhysicalDevice = pDevice->pPhysicalDevice;
- if (pSwapchain && pPhysicalDevice && pPhysicalDevice->gotSurfaceCapabilities) {
- // Look to see if the application has already acquired the maximum
- // number of images, and this will push it past the spec-defined
- // limits:
- uint32_t minImageCount = pPhysicalDevice->surfaceCapabilities.minImageCount;
- uint32_t imagesAcquiredByApp = 0;
- for (uint32_t i = 0; i < pSwapchain->imageCount; i++) {
- if (pSwapchain->images[i].acquiredByApp) {
- imagesAcquiredByApp++;
- }
- }
- if (imagesAcquiredByApp > (pSwapchain->imageCount - minImageCount)) {
- skip_call |= log_msg(
- my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
- reinterpret_cast<uint64_t>(device), __LINE__, SWAPCHAIN_APP_ACQUIRES_TOO_MANY_IMAGES, swapchain_layer_name,
- "vkAcquireNextImageKHR() called when it cannot succeed. The application has acquired %d image(s) that have not "
- "yet "
- "been presented. The maximum number of images that the application can simultaneously acquire from this swapchain "
- "(including this call to vkCreateSwapchainKHR()) is %d. That value is derived by subtracting "
- "VkSurfaceCapabilitiesKHR::minImageCount (%d) from the number of images in the swapchain (%d) and adding 1.",
- imagesAcquiredByApp, (pSwapchain->imageCount - minImageCount + 1), minImageCount, pSwapchain->imageCount);
- }
- }
lock.unlock();
if (!skip_call) {