diff options
author | Tobin Ehlis <tobine@google.com> | 2017-04-24 15:31:38 -0600 |
---|---|---|
committer | Tobin Ehlis <tobine@google.com> | 2017-04-25 08:01:31 -0600 |
commit | 5f5e4095d630df9003597a928c86502e3fc83176 (patch) | |
tree | ff04e3f0ed54d6b746057d6ab656157cdc196c34 | |
parent | fad18b0689ddc8768fc948e56124136ad223baf4 (diff) |
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.
-rw-r--r-- | layers/core_validation.cpp | 14 | ||||
-rw-r--r-- | layers/vk_validation_error_database.txt | 2 |
2 files changed, 15 insertions, 1 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; } diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt index be851197..5076422a 100644 --- a/layers/vk_validation_error_database.txt +++ b/layers/vk_validation_error_database.txt @@ -3034,7 +3034,7 @@ VALIDATION_ERROR_03210~^~N~^~Unknown~^~vkQueuePresentKHR~^~For more information VALIDATION_ERROR_03211~^~N~^~Unknown~^~vkQueuePresentKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkDeviceGroupPresentInfoKHX)~^~implicit VALIDATION_ERROR_03212~^~N~^~Unknown~^~vkQueuePresentKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'If swapchainCount is not 0, pDeviceMasks must be a pointer to an array of swapchainCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkDeviceGroupPresentInfoKHX)~^~implicit VALIDATION_ERROR_03213~^~N~^~Unknown~^~vkQueuePresentKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'mode must be a valid VkDeviceGroupPresentModeFlagBitsKHX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkDeviceGroupPresentInfoKHX)~^~implicit -VALIDATION_ERROR_03214~^~N~^~Unknown~^~vkQueuePresentKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'swapchainCount must be the same value as VkPresentInfoKHR::swapchainCount, where VkPresentInfoKHR is in the pNext chain of this VkPresentTimesInfoGOOGLE structure.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkPresentTimesInfoGOOGLE)~^~ +VALIDATION_ERROR_03214~^~Y~^~Unknown~^~vkQueuePresentKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'swapchainCount must be the same value as VkPresentInfoKHR::swapchainCount, where VkPresentInfoKHR is in the pNext chain of this VkPresentTimesInfoGOOGLE structure.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkPresentTimesInfoGOOGLE)~^~ VALIDATION_ERROR_03215~^~N~^~Unknown~^~vkQueuePresentKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'sType must be VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkPresentTimesInfoGOOGLE)~^~implicit VALIDATION_ERROR_03216~^~N~^~Unknown~^~vkQueuePresentKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'If pTimes is not NULL, pTimes must be a pointer to an array of swapchainCount VkPresentTimeGOOGLE structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkPresentTimesInfoGOOGLE)~^~implicit VALIDATION_ERROR_03217~^~N~^~Unknown~^~vkQueuePresentKHR~^~For more information refer to Vulkan Spec Section '30.8. WSI Swapchain' which states 'swapchainCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkPresentTimesInfoGOOGLE)~^~implicit |