diff options
| author | szdarkhack <szdarkhack@hotmail.com> | 2016-03-12 18:41:19 +0200 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-03-15 10:40:41 -0600 |
| commit | f52be9f8f2c4287f182195975b7013c573a46a0b (patch) | |
| tree | 4d47cc7fd3b7239515c5bbaf7f297247d01a24f6 /layers/swapchain.cpp | |
| parent | 4123a35a8453000cddf379fb0b166d2dcd5974e2 (diff) | |
| download | usermoji-f52be9f8f2c4287f182195975b7013c573a46a0b.tar.xz | |
layers: PR118, Remove erroneous validation error from swapchain
Remove error when selecting VK_PRESENT_MODE_FIFO_KHR (required to be supported)
without enumerating the supported presentation modes first.
Change-Id: Iacc8fa55dec1b1f72011041813b423f95912a092
Diffstat (limited to 'layers/swapchain.cpp')
| -rw-r--r-- | layers/swapchain.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp index a61449fb..41622b44 100644 --- a/layers/swapchain.cpp +++ b/layers/swapchain.cpp @@ -1518,10 +1518,12 @@ static VkBool32 validateCreateSwapchainKHR(VkDevice device, const VkSwapchainCre // Validate pCreateInfo values with the results of // vkGetPhysicalDeviceSurfacePresentModesKHR(): if (!pPhysicalDevice || !pPhysicalDevice->presentModeCount) { - skipCall |= LOG_ERROR(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, device, "VkDevice", SWAPCHAIN_CREATE_SWAP_WITHOUT_QUERY, - "%s() called before calling " - "vkGetPhysicalDeviceSurfacePresentModesKHR().", - fn); + if (!pCreateInfo || (pCreateInfo->presentMode != VK_PRESENT_MODE_FIFO_KHR)) { + skipCall |= LOG_ERROR(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, device, "VkDevice", SWAPCHAIN_CREATE_SWAP_WITHOUT_QUERY, + "%s() called before calling " + "vkGetPhysicalDeviceSurfacePresentModesKHR().", + fn); + } } else if (pCreateInfo) { // Validate pCreateInfo->presentMode against // vkGetPhysicalDeviceSurfacePresentModesKHR(): |
