Fix vkGetPhysicalDeviceSurfaceSupportKHR returning an error code#1723
Conversation
wsi_unwrap_icd_surface() returns VK_ERROR_EXTENSION_NOT_PRESENT when the surface extension isn't supported. Which is a problem for vkGetPhysicalDeviceSurfaceSupportKHR because its suppose to set the out parameter to false, not return an error code.
Makes the header file not contain internal helper functions that tests shouldn't be using. Also makes test_icd.cpp use the helper functions more often.
|
CI Vulkan-Loader build queued with queue ID 461278. |
|
CI Vulkan-Loader build queued with queue ID 461308. |
|
CI Vulkan-Loader build # 3070 running. |
|
CI Vulkan-Loader build # 3070 failed. |
c191212 to
fb13979
Compare
|
CI Vulkan-Loader build queued with queue ID 464216. |
|
CI Vulkan-Loader build # 3078 running. |
|
CI Vulkan-Loader build # 3078 failed. |
|
The part about ignoring the error code makes sense to me. While the spec is quite unclear about what should happen in this case and physical device queries usually aren't supposed to "behave well" with functionality that depends on an extension that is not supported by the target ICD, considering that the surface extensions are instance extensions, I believe that this is the responsibility of the loader to deal with, because the application has no knowledge about which ICDs support the instance extension, so this fix looks good. |
…t the surface extension
fb13979 to
996546b
Compare
|
CI Vulkan-Loader build queued with queue ID 465873. |
|
CI Vulkan-Loader build queued with queue ID 465890. |
|
CI Vulkan-Loader build # 3080 running. |
|
CI Vulkan-Loader build # 3080 passed. |
wsi_unwrap_icd_surface() returns VK_ERROR_EXTENSION_NOT_PRESENT when the
surface extension isn't supported by an ICD. Which is a problem for
vkGetPhysicalDeviceSurfaceSupportKHR because its suppose to set the out
parameter to false, not return an error code. The fix is to not propagate VK_ERROR_EXTENSION_NOT_PRESENT
up from vkGetPhysicalDeviceSurfaceSupportKHR, simply set pSupported to false and return VK_SUCCESS.
Also makes improvements to test_icd.cpp and adds a test for this case (only valid on linux, where multiple surface extensions are easily used at the same time).
@aqnuep Not looking for a heavy review, more making sure you agree that vkGetPhysicalDeviceSurfaceSupportKHR had a bug and this is the fix for it.