You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vkGetPhysicalDeviceSurfacePresentModesKHR() called with non-NULL pPresentModeCount; but no prior positive value has been seen for pPresentModeCount
But I believe common sense dictates that the number of supported swapchain modes can never exceed the number of swapchain modes. I think this warning is a bit too aggressive in cases like these.
The text was updated successfully, but these errors were encountered:
Comment by haasn (MIGRATED) Sunday Sep 17, 2017 at 05:22 GMT
To clarify, the expected behavior would be for this layer check to look at the contents of *pPresentModeCount, and only warn if it's lower than VK_PRESENT_MODE_RANGE_SIZE_KHR.
Comment by krOoze (MIGRATED) Tuesday Sep 19, 2017 at 13:16 GMT
Problem with common sense is that it is wrong more often than not.
Firstly you should not be using VK_PRESENT_MODE_RANGE_SIZE_KHR. TMK it is deprecated. And always was non-standard anyway.
Secondly it is defined as VK_PRESENT_MODE_RANGE_SIZE_KHR = (VK_PRESENT_MODE_FIFO_RELAXED_KHR - VK_PRESENT_MODE_IMMEDIATE_KHR + 1) which results in 4, but if you look closely, there are 6 present modes including the extended ones.
Thirdly as you can see, the size is not constexpr by nature. New extensions may add to this list at any point, even if your older vulkan.h does not know the enumerants and does not account them into _RANGE_SIZE_ yet.
Such warning simply says you are not using the API as intended. Though as I modified similar commands I used to think it is bit overzealous too (there's also VK_INCOMPLETE). Then again, people seem to keep trying to cheat around the need to query the array size first.
Issue by haasn (MIGRATED)
Sunday Sep 17, 2017 at 05:21 GMT
Originally opened as KhronosGroup/Vulkan-LoaderAndValidationLayers#2071
In this code:
I get an error as follows:
But I believe common sense dictates that the number of supported swapchain modes can never exceed the number of swapchain modes. I think this warning is a bit too aggressive in cases like these.
The text was updated successfully, but these errors were encountered: