Set dEQP process to be high-dpi aware on Windows
authorSlawomir Cygan <slawomir.cygan@intel.com>
Mon, 24 Aug 2020 15:01:15 +0000 (17:01 +0200)
committerSlawomir Cygan <slawomir.cygan@intel.com>
Mon, 24 Aug 2020 15:06:04 +0000 (17:06 +0200)
On systems with DPI scaling enabled the thread should
be high-DPI aware to create windows, that could be used for
exlusive full-screen swapchains with application control.

Components: Vulkan, Framework

VK-GL-CTS Issue: 2558

Affects: dEQP-VK.wsi.win32.full_screen_exclusive.application_controlled

Change-Id: Ibfedb804d902ef41eafcb10cde0d3c2d8e281797

framework/platform/win32/tcuWin32Platform.cpp

index 0517c60c7bb21f3e5bf023e786fb15d0ea0beace..bd38dbdd406f6331c340aa235408c8fb34621326 100644 (file)
@@ -38,6 +38,15 @@ Platform::Platform (void)
        // Set process priority to lower.
        SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);
 
+
+       // Set process to be DPI aware
+       // This is requried for VK tests that manually enter exclusive mode
+       // using VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT
+       if (SetProcessDPIAware() == 0)
+       {
+               TCU_FAIL("SetProcessDPIAware  function failed");
+       }
+
        {
                wgl::ContextFactory* factory = DE_NULL;