[PATCH 5/5] dxgi: Slightly simplify d3d11_swapchain_init().
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- dlls/dxgi/device.c | 4 ++-- dlls/dxgi/dxgi_private.h | 2 +- dlls/dxgi/swapchain.c | 12 +++++------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c index d6dd0418c47..e3dc52b8ed6 100644 --- a/dlls/dxgi/device.c +++ b/dlls/dxgi/device.c @@ -474,7 +474,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_factory_create_swapchain(IWineDX return E_OUTOFMEMORY; } - if (FAILED(hr = d3d11_swapchain_init(object, device, &wined3d_desc, FALSE))) + if (FAILED(hr = d3d11_swapchain_init(object, device, &wined3d_desc))) { WARN("Failed to initialise swapchain, hr %#x.\n", hr); heap_free(object); @@ -578,7 +578,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l return E_OUTOFMEMORY; } - if (FAILED(hr = d3d11_swapchain_init(swapchain, device, &swapchain_desc, TRUE))) + if (FAILED(hr = d3d11_swapchain_init(swapchain, device, &swapchain_desc))) { WARN("Failed to initialize swapchain, hr %#x.\n", hr); heap_free(swapchain); diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h index 5c5775ca377..b6999c729a4 100644 --- a/dlls/dxgi/dxgi_private.h +++ b/dlls/dxgi/dxgi_private.h @@ -178,7 +178,7 @@ struct d3d11_swapchain }; HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_device *device, - struct wined3d_swapchain_desc *desc, BOOL implicit) DECLSPEC_HIDDEN; + struct wined3d_swapchain_desc *desc) DECLSPEC_HIDDEN; HRESULT d3d12_swapchain_create(IWineDXGIFactory *factory, ID3D12CommandQueue *queue, HWND window, const DXGI_SWAP_CHAIN_DESC1 *swapchain_desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc, diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index 17f9a1e43d6..53da2081e89 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -779,16 +779,14 @@ static const struct wined3d_parent_ops d3d11_swapchain_wined3d_parent_ops = }; HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_device *device, - struct wined3d_swapchain_desc *desc, BOOL implicit) + struct wined3d_swapchain_desc *desc) { HRESULT hr; - /* - * A reference to the implicit swapchain is held by the wined3d device. - * In order to avoid circular references we do not keep a reference - * to the device in the implicit swapchain. - */ - if (!implicit) + /* A reference to the implicit swapchain is held by the wined3d device. In + * order to avoid circular references we do not keep a reference to the + * device in the implicit swapchain. */ + if (!(desc->flags & WINED3D_SWAPCHAIN_IMPLICIT)) { if (desc->backbuffer_format == WINED3DFMT_UNKNOWN) return E_INVALIDARG; -- 2.11.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=50911 Your paranoid android. === debian9 (32 bit Chinese:China report) === d3d11: d3d11.c:5665: Test failed: Got unexpected hr 0x8876086a. === debian9 (32 bit WoW report) === d3d11: d3d11.c:5665: Test failed: Got unexpected hr 0x8876086a. Unhandled exception: page fault on execute access to 0x00000000 in 32-bit code (0x00000000). === debian9 (64 bit WoW report) === d3d11: d3d11.c:5418: Test failed: Got unexpected hr 0x8876086a for query type 4. d3d11.c:16770: Test failed: Got {-1.00787401e+00, 0.00000000e+00, 1.00000000e+00, 5.03937006e-01}, expected {-1.00000000e+00, 0.00000000e+00, 1.00000000e+00, 5.03937006e-01} at (0, 0), sub-resource 0.
participants (2)
-
Henri Verbeet -
Marvin