The QXL driver used by Windows 10 TestBots doesn't report 800x600 as a supported resolution. Switching to full screen may fail even though some DXGI methods report success.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- Fix test failures like in https://test.winehq.org/data/7096ab45444d7b7cbb926b5a51af0cbc46960ed3/win10_...
dlls/dxgi/tests/dxgi.c | 62 +++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index cc49c7b2ae1..eb22b0d212b 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -1522,8 +1522,8 @@ static void test_create_swapchain(void) return; }
- creation_desc.BufferDesc.Width = 800; - creation_desc.BufferDesc.Height = 600; + creation_desc.BufferDesc.Width = 1024; + creation_desc.BufferDesc.Height = 768; creation_desc.BufferDesc.RefreshRate.Numerator = 60; creation_desc.BufferDesc.RefreshRate.Denominator = 60; creation_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; @@ -2222,7 +2222,7 @@ static void test_swapchain_fullscreen_state(IDXGISwapChain *swapchain,
expected_state = *initial_state; compute_expected_swapchain_fullscreen_state_after_fullscreen_change(&expected_state, - &swapchain_desc, &initial_state->fullscreen_state.monitor_rect, 800, 600, NULL); + &swapchain_desc, &initial_state->fullscreen_state.monitor_rect, 1024, 768, NULL); hr = IDXGISwapChain_GetContainingOutput(swapchain, &expected_state.target); ok(SUCCEEDED(hr), "GetContainingOutput failed, hr %#x.\n", hr);
@@ -2291,7 +2291,7 @@ static void test_swapchain_fullscreen_state(IDXGISwapChain *swapchain, expected_state.fullscreen_state.monitor = output_desc.Monitor; expected_state.fullscreen_state.monitor_rect = orig_monitor_rect; compute_expected_swapchain_fullscreen_state_after_fullscreen_change(&expected_state, - &swapchain_desc, &orig_monitor_rect, 800, 600, NULL); + &swapchain_desc, &orig_monitor_rect, 1024, 768, NULL);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, output); ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); @@ -2376,8 +2376,8 @@ static void test_set_fullscreen(IUnknown *device, BOOL is_d3d12)
get_factory(device, is_d3d12, &factory);
- swapchain_desc.BufferDesc.Width = 800; - swapchain_desc.BufferDesc.Height = 600; + swapchain_desc.BufferDesc.Width = 1024; + swapchain_desc.BufferDesc.Height = 768; swapchain_desc.BufferDesc.RefreshRate.Numerator = 60; swapchain_desc.BufferDesc.RefreshRate.Denominator = 60; swapchain_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; @@ -2808,8 +2808,8 @@ static void test_resize_target(IUnknown *device, BOOL is_d3d12)
get_factory(device, is_d3d12, &factory);
- swapchain_desc.BufferDesc.Width = 800; - swapchain_desc.BufferDesc.Height = 600; + swapchain_desc.BufferDesc.Width = 1024; + swapchain_desc.BufferDesc.Height = 768; swapchain_desc.BufferDesc.RefreshRate.Numerator = 60; swapchain_desc.BufferDesc.RefreshRate.Denominator = 1; swapchain_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; @@ -2848,7 +2848,7 @@ static void test_resize_target(IUnknown *device, BOOL is_d3d12) { expected_state.fullscreen = TRUE; compute_expected_swapchain_fullscreen_state_after_fullscreen_change(&expected_state, - &swapchain_desc, &initial_state.fullscreen_state.monitor_rect, 800, 600, NULL); + &swapchain_desc, &initial_state.fullscreen_state.monitor_rect, 1024, 768, NULL); hr = IDXGISwapChain_GetContainingOutput(swapchain, &expected_state.target); ok(SUCCEEDED(hr) || broken(hr == DXGI_ERROR_UNSUPPORTED) /* Win 7 testbot */, "GetContainingOutput failed, hr %#x.\n", hr); @@ -2918,8 +2918,8 @@ static LRESULT CALLBACK resize_target_wndproc(HWND hwnd, unsigned int message, W ok(!!swapchain, "GWLP_USERDATA is NULL.\n"); hr = IDXGISwapChain_GetDesc(swapchain, &desc); ok(hr == S_OK, "Failed to get desc, hr %#x.\n", hr); - ok(desc.BufferDesc.Width == 800, "Got unexpected buffer width %u.\n", desc.BufferDesc.Width); - ok(desc.BufferDesc.Height == 600, "Got unexpected buffer height %u.\n", desc.BufferDesc.Height); + ok(desc.BufferDesc.Width == 1024, "Got unexpected buffer width %u.\n", desc.BufferDesc.Width); + ok(desc.BufferDesc.Height == 768, "Got unexpected buffer height %u.\n", desc.BufferDesc.Height); return 0;
default: @@ -3009,8 +3009,8 @@ static void test_resize_target_wndproc(void) hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); ok(hr == S_OK, "Failed to get parent, hr %#x.\n", hr);
- swapchain_desc.BufferDesc.Width = 800; - swapchain_desc.BufferDesc.Height = 600; + swapchain_desc.BufferDesc.Width = 1024; + swapchain_desc.BufferDesc.Height = 768; swapchain_desc.BufferDesc.RefreshRate.Numerator = 60; swapchain_desc.BufferDesc.RefreshRate.Denominator = 1; swapchain_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; @@ -3038,9 +3038,9 @@ static void test_resize_target_wndproc(void)
hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); ok(hr == S_OK, "Getswapchain_desc failed, hr %#x.\n", hr); - ok(swapchain_desc.BufferDesc.Width == 800, + ok(swapchain_desc.BufferDesc.Width == 1024, "Got unexpected buffer width %u.\n", swapchain_desc.BufferDesc.Width); - ok(swapchain_desc.BufferDesc.Height == 600, + ok(swapchain_desc.BufferDesc.Height == 768, "Got unexpected buffer height %u.\n", swapchain_desc.BufferDesc.Height);
ret = GetClientRect(swapchain_desc.OutputWindow, &rect); @@ -3102,8 +3102,8 @@ static void test_inexact_modes(void) hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); ok(SUCCEEDED(hr), "GetParent failed, hr %#x.\n", hr);
- swapchain_desc.BufferDesc.Width = 800; - swapchain_desc.BufferDesc.Height = 600; + swapchain_desc.BufferDesc.Width = 1024; + swapchain_desc.BufferDesc.Height = 768; swapchain_desc.BufferDesc.RefreshRate.Numerator = 60; swapchain_desc.BufferDesc.RefreshRate.Denominator = 1; swapchain_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; @@ -3202,8 +3202,8 @@ static void test_inexact_modes(void) ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount);
/* Test ResizeTarget(). */ - swapchain_desc.BufferDesc.Width = 800; - swapchain_desc.BufferDesc.Height = 600; + swapchain_desc.BufferDesc.Width = 1024; + swapchain_desc.BufferDesc.Height = 768; swapchain_desc.Windowed = TRUE;
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); @@ -3220,8 +3220,8 @@ static void test_inexact_modes(void) check_swapchain_fullscreen_state(swapchain, &expected_state); hr = IDXGISwapChain_GetDesc(swapchain, &result_desc); ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); - ok(result_desc.BufferDesc.Width == 800, "Got width %u.\n", result_desc.BufferDesc.Width); - ok(result_desc.BufferDesc.Height == 600, "Got height %u.\n", result_desc.BufferDesc.Height); + ok(result_desc.BufferDesc.Width == 1024, "Got width %u.\n", result_desc.BufferDesc.Width); + ok(result_desc.BufferDesc.Height == 768, "Got height %u.\n", result_desc.BufferDesc.Height);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); ok(SUCCEEDED(hr), "SetFullscreenState failed, hr %#x.\n", hr); @@ -4201,8 +4201,8 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12)
get_factory(device, is_d3d12, &factory);
- swapchain_desc.BufferDesc.Width = 800; - swapchain_desc.BufferDesc.Height = 600; + swapchain_desc.BufferDesc.Width = 1024; + swapchain_desc.BufferDesc.Height = 768; swapchain_desc.BufferDesc.RefreshRate.Numerator = 60; swapchain_desc.BufferDesc.RefreshRate.Denominator = 60; swapchain_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; @@ -5288,8 +5288,8 @@ static void test_swapchain_window_messages(void) ok(hr == S_OK, "Failed to get parent, hr %#x.\n", hr); IDXGIAdapter_Release(adapter);
- swapchain_desc.BufferDesc.Width = 800; - swapchain_desc.BufferDesc.Height = 600; + swapchain_desc.BufferDesc.Width = 1024; + swapchain_desc.BufferDesc.Height = 768; swapchain_desc.BufferDesc.RefreshRate.Numerator = 60; swapchain_desc.BufferDesc.RefreshRate.Denominator = 60; swapchain_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; @@ -5315,8 +5315,8 @@ static void test_swapchain_window_messages(void) /* resize target */ expect_messages = resize_target_messages; memset(&mode_desc, 0, sizeof(mode_desc)); - mode_desc.Width = 800; - mode_desc.Height = 600; + mode_desc.Width = 1024; + mode_desc.Height = 768; hr = IDXGISwapChain_ResizeTarget(swapchain, &mode_desc); ok(hr == S_OK, "Failed to resize target, hr %#x.\n", hr); flush_events(); @@ -5449,8 +5449,8 @@ static void test_swapchain_window_styles(void) ok(hr == S_OK, "Failed to get parent, hr %#x.\n", hr); IDXGIAdapter_Release(adapter);
- swapchain_desc.BufferDesc.Width = 800; - swapchain_desc.BufferDesc.Height = 600; + swapchain_desc.BufferDesc.Width = 1024; + swapchain_desc.BufferDesc.Height = 768; swapchain_desc.BufferDesc.RefreshRate.Numerator = 60; swapchain_desc.BufferDesc.RefreshRate.Denominator = 60; swapchain_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; @@ -5889,8 +5889,8 @@ static void test_output_ownership(IUnknown *device, BOOL is_d3d12) check_ownership_desc.VidPnSourceId = open_adapter_gdi_desc.VidPnSourceId; wait_vidpn_exclusive_ownership(&check_ownership_desc, STATUS_SUCCESS, FALSE);
- swapchain_desc.BufferDesc.Width = 800; - swapchain_desc.BufferDesc.Height = 600; + swapchain_desc.BufferDesc.Width = 1024; + swapchain_desc.BufferDesc.Height = 768; swapchain_desc.BufferDesc.RefreshRate.Numerator = 60; swapchain_desc.BufferDesc.RefreshRate.Denominator = 1; swapchain_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
Am 06.04.2020 um 13:52 schrieb Zhiyi Zhang zzhang@codeweavers.com:
The QXL driver used by Windows 10 TestBots doesn't report 800x600 as a supported resolution. Switching to full screen may fail even though some DXGI methods report success.
Might this only be working because 1024x768 is the current resolution?
On 4/6/20 8:35 PM, Stefan Dösinger wrote:
Am 06.04.2020 um 13:52 schrieb Zhiyi Zhang zzhang@codeweavers.com:
The QXL driver used by Windows 10 TestBots doesn't report 800x600 as a supported resolution. Switching to full screen may fail even though some DXGI methods report success.
Might this only be working because 1024x768 is the current resolution?
I don't think so. 1440x900 used in https://testbot.winehq.org/JobDetails.pl?Key=68996 also fix the failures. You can also check https://testbot.winehq.org/JobDetails.pl?Key=68948&f101=exe32.report#k10.... I print out the display mode list from GetDisplayModeList and there is no 800x600. I also got a Windows 10 on libvirt with QXL driver installed. There also isn't a 800x600 in system control panel.
Thanks, Zhiyi
Am 06.04.2020 um 15:30 schrieb Zhiyi Zhang zzhang@codeweavers.com: I don't think so. 1440x900 used in https://testbot.winehq.org/JobDetails.pl?Key=68996 also fix the failures. You can also check https://testbot.winehq.org/JobDetails.pl?Key=68948&f101=exe32.report#k10.... I print out the display mode list from GetDisplayModeList and there is no 800x600. I also got a Windows 10 on libvirt with QXL driver installed. There also isn't a 800x600 in system control panel.
Thanks for checking, I'll keep that in mind - I was about to send a patch for a similar ddraw failure and I just assumed that QXL did not support any resolution changes...
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68981
Your paranoid android.
=== w1064v1809 (32 bit report) ===
dxgi: dxgi.c:5185: Test failed: Got unexpected message 0x31f, hwnd 000F0066, wparam 0x1, lparam 0.
=== w1064v1809_ja (32 bit report) ===
dxgi: dxgi.c:2467: Test failed: Got unexpected hr 0x887a0022. dxgi.c:2470: Test failed: Got unexpected fullscreen 0. dxgi.c:2473: Test failed: Got unexpected hr 0x887a0022. dxgi.c:2476: Test failed: Got unexpected fullscreen 0.
=== w1064v1809 (64 bit report) ===
dxgi: dxgi.c:5185: Test failed: Got unexpected message 0x31f, hwnd 00000000000502B4, wparam 0x1, lparam 0.