From df99aa1debf6df6d63c2e54a58571cd6af95c95d Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Mon, 24 Apr 2017 15:31:38 -0600 Subject: layers:Validate display_timing swapchainCount For the VK_GOOGLE_display_timing extension validate that the swapchainCount in the VkPresentTimesInfoGOOGLE extension struct matches the swapchainCount in the VkPresentInfoKHR struct. Update unique ID database. --- layers/core_validation.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 6b92b5ba..2673602d 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -10744,6 +10744,20 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf } } } + } else if (VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE == pnext->sType) { + VkPresentTimesInfoGOOGLE *present_times_info = (VkPresentTimesInfoGOOGLE *)pnext; + if (pPresentInfo->swapchainCount != present_times_info->swapchainCount) { + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, + reinterpret_cast(pPresentInfo->pSwapchains[0]), __LINE__, + + VALIDATION_ERROR_03214, "DS", + "vkQueuePresentKHR(): VkPresentTimesInfoGOOGLE.swapchainCount is %i but " + "pPresentInfo->swapchainCount is %i. For VkPresentTimesInfoGOOGLE down pNext " + "chain of VkPresentInfoKHR, VkPresentTimesInfoGOOGLE.swapchainCount " + "must equal VkPresentInfoKHR.swapchainCount.", + present_times_info->swapchainCount, pPresentInfo->swapchainCount); + } } pnext = (std_header *)pnext->pNext; } -- cgit v1.2.3