Check vkGetInstanceProcAddr works with NULL instance
authorRicardo Garcia <rgarcia@igalia.com>
Tue, 24 Mar 2020 16:31:31 +0000 (17:31 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 17 Apr 2020 09:11:31 +0000 (05:11 -0400)
This commit makes sure vkGetInstanceProcAddr can resolve itself when
used with a NULL instance, being a platform function.

In addition, vkEnumerateInstanceVersion is always checked, when present
in the corresponding API table, to work as a platform function returning
a function pointer when called with a NULL instance.

Affected tests:
dEQP-VK.api.version_check.entry_points

Components: Vulkan
VK-GL-CTS issue: 2278

Change-Id: Ia6e23b8aa2328646003ada8e4d5947656566ccaf

external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp

index 12fb584..2b3cece 100644 (file)
@@ -127,8 +127,8 @@ public:
                                                                APIEntryPointsTestInstance      (Context&                               ctx)
                                                                        : TestInstance  (ctx)
        {
-
        }
+
        virtual tcu::TestStatus         iterate                                         (void)
        {
                tcu::TestLog&                                           log                             = m_context.getTestContext().getLog();
@@ -450,7 +450,7 @@ private:
                const deUint32 startingQuantity = failsQuantity;
                for (deUint32 ndx = 0u; ndx < testsArr.size(); ++ndx)
                {
-                       if (deStringEqual(testsArr[ndx].first, "vkGetInstanceProcAddr") || deStringEqual(testsArr[ndx].first, "vkEnumerateInstanceVersion"))
+                       if (deStringEqual(testsArr[ndx].first, "vkGetInstanceProcAddr") && m_context.getUsedApiVersion() < VK_API_VERSION_1_2)
                                continue;
 
                        const deUint32 functionType     = testsArr[ndx].second;