Fix instance mixing in surfaceFormatRenderTest
authorjpark37 <jpark37@users.noreply.github.com>
Sat, 8 Aug 2020 05:34:32 +0000 (22:34 -0700)
committerjpark37 <jpark37@users.noreply.github.com>
Sat, 8 Aug 2020 05:34:32 +0000 (22:34 -0700)
external/vulkancts/modules/vulkan/wsi/vktWsiColorSpaceTests.cpp

index 13bc5e4..6bd8962 100644 (file)
@@ -434,13 +434,13 @@ tcu::TestStatus basicExtensionTest (Context& context, Type wsiType)
 
 tcu::TestStatus surfaceFormatRenderTest (Context& context,
                                                                                 Type wsiType,
+                                                                                const InstanceHelper& instHelper,
+                                                                                const DeviceHelper& devHelper,
                                                                                 VkSurfaceKHR surface,
                                                                                 VkSurfaceFormatKHR curFmt,
                                                                                 deBool checkHdr = false)
 {
        const tcu::UVec2                                        desiredSize             (256, 256);
-       const InstanceHelper                            instHelper              (context, wsiType);
-       const DeviceHelper                                      devHelper               (context, instHelper.vki, instHelper.instance, surface);
        const DeviceInterface&                          vkd                             = devHelper.vkd;
        const VkDevice                                          device                  = *devHelper.device;
        SimpleAllocator                                         allocator               (vkd, device, getPhysicalDeviceMemoryProperties(instHelper.vki, devHelper.physicalDevice));
@@ -593,7 +593,7 @@ tcu::TestStatus surfaceFormatRenderTests (Context& context, Type wsiType)
                                                                                                                                                                                         *surface);
        for (vector<VkSurfaceFormatKHR>::const_iterator curFmt = formats.begin(); curFmt != formats.end(); ++curFmt)
        {
-               surfaceFormatRenderTest(context, wsiType, *surface, *curFmt);
+               surfaceFormatRenderTest(context, wsiType, instHelper, devHelper, *surface, *curFmt);
        }
        return tcu::TestStatus::pass("Rendering tests succeeded");
 }
@@ -614,7 +614,7 @@ tcu::TestStatus surfaceFormatRenderWithHdrTests (Context& context, Type wsiType)
                                                                                                                                                                                  *surface);
        for (vector<VkSurfaceFormatKHR>::const_iterator curFmt = formats.begin(); curFmt != formats.end(); ++curFmt)
        {
-               surfaceFormatRenderTest(context, wsiType, *surface, *curFmt, true);
+               surfaceFormatRenderTest(context, wsiType, instHelper, devHelper, *surface, *curFmt, true);
        }
        return tcu::TestStatus::pass("Rendering tests succeeded");
 }