Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/dxgi/tests/dxgi.c | 20 ++++++++++---------- dlls/wined3d/swapchain.c | 7 ++----- 2 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index 57547f1b540..0d3caa61783 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -4716,7 +4716,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) flush_events(); ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - todo_wine_if(!is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); output = NULL; @@ -4763,7 +4763,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - todo_wine_if(!is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
@@ -4771,7 +4771,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) /* An invisible window doesn't cause the swapchain to exit fullscreen * mode. */ hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - todo_wine_if(!is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); fullscreen = FALSE; @@ -4795,7 +4795,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) "Test %u: Got unexpected fullscreen status.\n", i);
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - todo_wine_if(!is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); todo_wine_if(is_d3d12) ok(hr == (is_d3d12 ? DXGI_STATUS_OCCLUDED : S_OK), "Test %u: Got unexpected hr %#x.\n", i, hr); @@ -4814,7 +4814,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) * IDXGISwapChain_Present() calls to work, otherwise they will return * DXGI_ERROR_INVALID_CALL */ hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - todo_wine_if(!is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); if (flags[i] == DXGI_PRESENT_TEST) todo_wine_if(is_d3d12) ok(hr == (is_d3d12 ? DXGI_STATUS_OCCLUDED : S_OK), @@ -4830,14 +4830,14 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) ShowWindow(occluding_window, SW_SHOW);
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - todo_wine_if(!is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); /* hr == S_OK on vista and 2008 */ todo_wine ok(hr == DXGI_STATUS_OCCLUDED || broken(hr == S_OK), "Test %u: Got unexpected hr %#x.\n", i, hr);
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - todo_wine_if(!is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); if (flags[i] == DXGI_PRESENT_TEST) { @@ -4846,12 +4846,12 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) /* IDXGISwapChain_Present() without flags refreshes the occlusion * state. */ hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - todo_wine_if(!is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDXGISwapChain_Present(swapchain, 0, 0); todo_wine ok(hr == DXGI_STATUS_OCCLUDED || broken(hr == S_OK), "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - todo_wine_if(!is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDXGISwapChain_Present(swapchain, 0, DXGI_PRESENT_TEST); ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); } @@ -4867,7 +4867,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) DestroyWindow(occluding_window); flush_events(); hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); - todo_wine_if(!is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 10e12a11482..693557448fe 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -2007,15 +2007,12 @@ HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapcha
if (!width || !height) { + RECT client_rect; + /* The application is requesting that either the swapchain width or * height be set to the corresponding dimension in the window's * client rect. */
- RECT client_rect; - - if (!desc->windowed) - return WINED3DERR_INVALIDCALL; - if (!GetClientRect(swapchain->state.device_window, &client_rect)) { ERR("Failed to get client rect, last error %#x.\n", GetLastError());
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=91356
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
dxgi: dxgi.c:7102: Test failed: Got a different mode. dxgi.c:7105: Test failed: Got a different mode. dxgi.c:7167: Test failed: Got a different mode. dxgi.c:7169: Test failed: Failed to restore display modes. dxgi.c:7189: Test failed: Failed to restore display modes. dxgi.c:7431: Test failed: Failed to restore display modes.