Many tests were using the V6 TestICD, which means that it exports the
EnumerateAdapterPhysicalDevices. The loader then only looks for devices
using that functionality and if the test didn't set it up, the driver
won't have its devices found.
Also:
* Cleaned up handle_validation_tests
* Added WSI setup helpers, which put all the setup code for WSI in one place
* Created a to/from_nondispatch_handle function for TestICD, probably should
be in a more general location
There was a regression with 1.3 that meant vkGetInstanceProcAddr wouldn't be
able to query itself if instance was set for 1.3. This commit makes it possible
to query for vkGetInstanceProcAddr with itself no matter the value of instance.
Verify that using vkGetInstanceProcAddr to get an entrypoint to a device
extension works when the extension is enabled, and crashes when the
extension isn't enabled.
Also, update a copyright notice date for my last commit.
Move all the behavior found in child classes of FrameworkEnvironment to the
FrameworkEnvironment itself, allowing easier composibility of behavior. The
original idea was to allow special case behavior for specific test cases but
this resulted in a lot of code duplication and difficulty combining different
framework behavior, such as adding a fake ICD and setting VK_ICD_FILENAMES at
the same time.
Vulkan header updated 1.2.193 changed the behavior of vkGetInstanceProcAddr for
global entrypoints. They used to always be returned regardless of the value of
the instance paramtere. The spec was amended in this version to only allow
querying global level entrypoints with a NULL instance. However, as to not
break old applications, the new behavior is only applied if the instance passed
in is both valid and minor version is greater than 1.2, which was when this
change in behavior occurred. Only instances with a newer version will get the
new behavior.
The issue was that trying to get a non-pre-instance function with a NULL
instance handle would cause a crash. This change also adds a test that
would of caught the oversight.
vkGetInstanceProcAddr should only return the pre-instance, aka global
functions, when the VkInstance handle is NULL. This brings the desktop
vulkan loader into alignment on the spec and with the android loader.
https://github.com/KhronosGroup/Vulkan-Docs/issues/1605
The repo previously did follow this rule, but was changes in the
1.0.42 header version timeframe for unknown reasons.