diff options
| author | Chris Forbes <chrisforbes@google.com> | 2016-10-12 10:21:19 +1300 |
|---|---|---|
| committer | Chris Forbes <chrisforbes@google.com> | 2016-11-22 11:45:12 +1300 |
| commit | 89fba1d446ca0aea1008835be82926ec9bb34f56 (patch) | |
| tree | 6629178b9f2d9c35fc3a37328e9064ac3f5b33ce /layers/swapchain.cpp | |
| parent | fc25df6e6d16e337fdd33e45fea0a6115c80da53 (diff) | |
| download | usermoji-89fba1d446ca0aea1008835be82926ec9bb34f56.tar.xz | |
layers: Move complaints about presenting on bad queues to CV
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/swapchain.cpp')
| -rw-r--r-- | layers/swapchain.cpp | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp index 82578d6f..3ae9bd4c 100644 --- a/layers/swapchain.cpp +++ b/layers/swapchain.cpp @@ -1715,45 +1715,10 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf bool skip_call = false; layer_data *my_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map); - // Note: pPresentInfo->pResults is allowed to be NULL - - std::unique_lock<std::mutex> lock(global_lock); - for (uint32_t i = 0; pPresentInfo && (i < pPresentInfo->swapchainCount); i++) { - SwpSwapchain *pSwapchain = NULL; - { - auto it = my_data->swapchainMap.find(pPresentInfo->pSwapchains[i]); - pSwapchain = (it == my_data->swapchainMap.end()) ? NULL : &it->second; - } - if (pSwapchain) { - SwpQueue *pQueue = NULL; - { - auto it = my_data->queueMap.find(queue); - pQueue = (it == my_data->queueMap.end()) ? NULL : &it->second; - } - SwpSurface *pSurface = pSwapchain->pSurface; - if (pQueue && pSurface && pSurface->numQueueFamilyIndexSupport) { - uint32_t queueFamilyIndex = pQueue->queueFamilyIndex; - // Note: the 1st test is to ensure queueFamilyIndex is in range, - // and the 2nd test is the validation check: - if ((pSurface->numQueueFamilyIndexSupport > queueFamilyIndex) && - (!pSurface->pQueueFamilyIndexSupport[queueFamilyIndex])) { - skip_call |= - log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - reinterpret_cast<const uint64_t &>(pPresentInfo->pSwapchains[i]), __LINE__, - SWAPCHAIN_SURFACE_NOT_SUPPORTED_WITH_QUEUE, swapchain_layer_name, - "vkQueuePresentKHR() called with a swapchain whose surface is not supported for presention " - "on this device with the queueFamilyIndex (i.e. %d) of the given queue.", - queueFamilyIndex); - } - } - } - } - lock.unlock(); - if (!skip_call) { // Call down the call chain: result = my_data->device_dispatch_table->QueuePresentKHR(queue, pPresentInfo); - lock.lock(); + std::unique_lock<std::mutex> lock(global_lock); if (pPresentInfo && ((result == VK_SUCCESS) || (result == VK_SUBOPTIMAL_KHR))) { for (uint32_t i = 0; i < pPresentInfo->swapchainCount; i++) { |
