From: Conor McCarthy cmccarthy@codeweavers.com
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/dxgi/swapchain.c | 12 ++++++++++-- dlls/dxgi/tests/dxgi.c | 26 +++++++++++++------------- 2 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index 728fcacccf6..0871200ff7c 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -2173,9 +2173,17 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d12_swapchain_SetFullscreen static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFullscreenState(IDXGISwapChain3 *iface, BOOL *fullscreen, IDXGIOutput **target) { - FIXME("iface %p, fullscreen %p, target %p stub!\n", iface, fullscreen, target); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface);
- return E_NOTIMPL; + TRACE("iface %p, fullscreen %p, target %p.\n", iface, fullscreen, target); + + if (fullscreen) + *fullscreen = !swapchain->fullscreen_desc.Windowed; + + if (target) + *target = NULL; + + return S_OK; }
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDesc(IDXGISwapChain3 *iface, DXGI_SWAP_CHAIN_DESC *desc) diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index ab33caf2e2d..5f5bb1e33d7 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -4163,7 +4163,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) output = NULL; fullscreen = FALSE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &output); - 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); todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); todo_wine_if(is_d3d12) ok(!!output, "Test %u: Got unexpected output.\n", i);
@@ -4172,20 +4172,20 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) /* Still fullscreen. */ fullscreen = FALSE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - 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); todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); /* Calling IDXGISwapChain_Present() will exit fullscreen. */ hr = IDXGISwapChain_Present(swapchain, 0, flags[i]); ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); fullscreen = TRUE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - 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); /* Now fullscreen mode is exited. */ if (!flags[i] && !is_d3d12) /* Still fullscreen on vista and 2008. */ todo_wine ok(!fullscreen || broken(fullscreen), "Test %u: Got unexpected fullscreen status.\n", i); else - ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); + todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); if (output) IDXGIOutput_Release(output);
@@ -4201,7 +4201,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); fullscreen = FALSE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - 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); todo_wine_if(is_d3d12) 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); @@ -4217,7 +4217,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); fullscreen = FALSE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - 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); todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); /* A visible, but with bottom z-order window still causes the * swapchain to exit fullscreen mode. */ @@ -4231,8 +4231,8 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) * for d3d12. */ fullscreen = TRUE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); - todo_wine_if(!is_d3d12) ok(is_d3d12 ? fullscreen : !fullscreen, + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + todo_wine ok(is_d3d12 ? fullscreen : !fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); @@ -4243,12 +4243,12 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12)
fullscreen = TRUE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - 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); if (flags[i] == DXGI_PRESENT_TEST) - todo_wine_if(!is_d3d12) ok(is_d3d12 ? fullscreen : !fullscreen, + todo_wine ok(is_d3d12 ? fullscreen : !fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); else - todo_wine ok(!fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); + todo_wine_if(!is_d3d12) ok(!fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
/* Even though d3d12 doesn't exit fullscreen, a * IDXGISwapChain_ResizeBuffers() is still needed for subsequent @@ -4302,8 +4302,8 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12) } fullscreen = TRUE; hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); - todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); - todo_wine ok(!fullscreen, "Test %u: Got unexpected fullscreen status.\n", i); + ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); + todo_wine_if(!is_d3d12) ok(!fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
DestroyWindow(occluding_window); hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0);
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=54971
Your paranoid android.
=== w2008s64 (64 bit report) ===
dxgi: dxgi.c:4832: Test failed: Got unexpected message 0x46, hwnd 00000000000E0106, wparam 0, lparam 0x22f990. dxgi.c:4832: Test failed: Got unexpected message 0x24, hwnd 00000000000E0106, wparam 0, lparam 0x22f600. dxgi.c:4832: Test failed: Got unexpected message 0x1a, hwnd 00000000000E0106, wparam 0x18, lparam 0x22f9b8. dxgi.c:4832: Test failed: Got unexpected message 0x1a, hwnd 00000000000E0106, wparam 0x2f, lparam 0x22f9b8.
=== debian10 (build log) ===
error: patch failed: dlls/wined3d/swapchain.c:85 error: patch failed: dlls/wined3d/wined3d_private.h:4183 error: patch failed: dlls/wined3d/device.c:5404 error: patch failed: dlls/wined3d/swapchain.c:86 error: patch failed: dlls/wined3d/wined3d_private.h:4181 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: dlls/wined3d/swapchain.c:85 error: patch failed: dlls/wined3d/wined3d_private.h:4183 error: patch failed: dlls/wined3d/device.c:5404 error: patch failed: dlls/wined3d/swapchain.c:86 error: patch failed: dlls/wined3d/wined3d_private.h:4181 Task: Patch failed to apply