aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2017-04-24 15:31:38 -0600
committerTobin Ehlis <tobine@google.com>2017-04-25 08:01:31 -0600
commitdf99aa1debf6df6d63c2e54a58571cd6af95c95d (patch)
tree229c719cd5176c29522f4edb2d0e9577a8a58de8 /layers/core_validation.cpp
parent17d166052ef388b1b10b57fef4804d386a5f4238 (diff)
downloadusermoji-df99aa1debf6df6d63c2e54a58571cd6af95c95d.tar.xz
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.
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp14
1 files changed, 14 insertions, 0 deletions
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<uint64_t const &>(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;
}