Wine-devel
Threads by month
- ----- 2026 -----
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
April 2019
- 82 participants
- 743 discussions
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mf/tests/mf.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index 4dfefdd459..80dc990254 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -298,24 +298,16 @@ static void test_topology(void)
ok(size == 1, "Unexpected item count.\n");
IMFCollection_Release(collection);
+ hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &node);
+ ok(hr == S_OK, "Failed to create a node, hr %#x.\n", hr);
+ hr = IMFTopology_AddNode(topology, node);
+ ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr);
+ IMFTopologyNode_Release(node);
+
hr = IMFTopology_GetOutputNodeCollection(topology, &collection);
ok(hr == S_OK || broken(hr == E_FAIL) /* before Win8 */, "Failed to get output node collection, hr %#x.\n", hr);
if (SUCCEEDED(hr))
{
- ok(!!collection, "Unexpected object pointer.\n");
- hr = IMFCollection_GetElementCount(collection, &size);
- ok(hr == S_OK, "Failed to get item count, hr %#x.\n", hr);
- ok(!size, "Unexpected item count.\n");
- IMFCollection_Release(collection);
-
- hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &node);
- ok(hr == S_OK, "Failed to create a node, hr %#x.\n", hr);
- hr = IMFTopology_AddNode(topology, node);
- ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr);
- IMFTopologyNode_Release(node);
-
- hr = IMFTopology_GetOutputNodeCollection(topology, &collection);
- ok(hr == S_OK, "Failed to get output node collection, hr %#x.\n", hr);
ok(!!collection, "Unexpected object pointer.\n");
hr = IMFCollection_GetElementCount(collection, &size);
ok(hr == S_OK, "Failed to get item count, hr %#x.\n", hr);
--
2.20.1
1
0
15 Apr '19
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d3d11/device.c | 28 -----------
dlls/d3d8/d3d8_private.h | 2 +-
dlls/d3d8/device.c | 59 +++++++++--------------
dlls/d3d9/d3d9_private.h | 2 +-
dlls/d3d9/device.c | 75 ++++++++++++------------------
dlls/ddraw/ddraw.c | 97 ++++++++++++++++----------------------
dlls/dxgi/device.c | 74 ++++++++++++++---------------
dlls/dxgi/dxgi_private.h | 1 +
dlls/wined3d/device.c | 103 ++++++++++++++++++++---------------------
dlls/wined3d/swapchain.c | 21 ++++++++-
dlls/wined3d/wined3d.spec | 2 -
dlls/wined3d/wined3d_private.h | 3 ++
include/wine/wined3d.h | 5 +-
include/wine/winedxgi.idl | 5 --
14 files changed, 201 insertions(+), 276 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 877775fdd3a..588395b4b6a 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -6106,33 +6106,6 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic
return S_OK;
}
-static HRESULT CDECL device_parent_create_swapchain(struct wined3d_device_parent *device_parent,
- struct wined3d_swapchain_desc *desc, struct wined3d_swapchain **swapchain)
-{
- struct d3d_device *device = device_from_wined3d_device_parent(device_parent);
- IWineDXGIDevice *wine_device;
- HRESULT hr;
-
- TRACE("device_parent %p, desc %p, swapchain %p.\n", device_parent, desc, swapchain);
-
- if (FAILED(hr = d3d11_device_QueryInterface(&device->ID3D11Device2_iface,
- &IID_IWineDXGIDevice, (void **)&wine_device)))
- {
- ERR("Device should implement IWineDXGIDevice.\n");
- return E_FAIL;
- }
-
- hr = IWineDXGIDevice_create_swapchain(wine_device, desc, TRUE, swapchain);
- IWineDXGIDevice_Release(wine_device);
- if (FAILED(hr))
- {
- ERR("Failed to create DXGI swapchain, returning %#x\n", hr);
- return hr;
- }
-
- return S_OK;
-}
-
static const struct wined3d_device_parent_ops d3d_wined3d_device_parent_ops =
{
device_parent_wined3d_device_created,
@@ -6140,7 +6113,6 @@ static const struct wined3d_device_parent_ops d3d_wined3d_device_parent_ops =
device_parent_activate,
device_parent_texture_sub_resource_created,
device_parent_create_swapchain_texture,
- device_parent_create_swapchain,
};
static int d3d_sampler_state_compare(const void *key, const struct wine_rb_entry *entry)
diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h
index 0f861658cf4..1669ff74315 100644
--- a/dlls/d3d8/d3d8_private.h
+++ b/dlls/d3d8/d3d8_private.h
@@ -131,7 +131,7 @@ struct d3d8_device
/* The d3d8 API supports only one implicit swapchain (no D3DCREATE_ADAPTERGROUP_DEVICE,
* no GetSwapchain, GetBackBuffer doesn't accept a swapchain number). */
- struct d3d8_swapchain *implicit_swapchain;
+ struct wined3d_swapchain *implicit_swapchain;
};
HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wined3d *wined3d, UINT adapter,
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 3dce0f60462..974764cdf51 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -594,7 +594,7 @@ static ULONG WINAPI d3d8_device_Release(IDirect3DDevice8 *iface)
if (device->index_buffer)
wined3d_buffer_decref(device->index_buffer);
- wined3d_device_uninit_3d(device->wined3d_device);
+ wined3d_swapchain_decref(device->implicit_swapchain);
wined3d_device_release_focus_window(device->wined3d_device);
wined3d_device_decref(device->wined3d_device);
heap_free(device->handle_table.entries);
@@ -877,6 +877,7 @@ static HRESULT WINAPI d3d8_device_Reset(IDirect3DDevice8 *iface,
{
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
struct wined3d_swapchain_desc swapchain_desc;
+ struct d3d8_swapchain *implicit_swapchain;
HRESULT hr;
TRACE("iface %p, present_parameters %p.\n", iface, present_parameters);
@@ -888,6 +889,7 @@ static HRESULT WINAPI d3d8_device_Reset(IDirect3DDevice8 *iface,
}
if (!wined3d_swapchain_desc_from_present_parameters(&swapchain_desc, present_parameters))
return D3DERR_INVALIDCALL;
+ swapchain_desc.flags |= WINED3D_SWAPCHAIN_IMPLICIT;
wined3d_mutex_lock();
@@ -909,7 +911,8 @@ static HRESULT WINAPI d3d8_device_Reset(IDirect3DDevice8 *iface,
{
device->recording = FALSE;
present_parameters->BackBufferCount = swapchain_desc.backbuffer_count;
- device->implicit_swapchain->swap_interval
+ implicit_swapchain = wined3d_swapchain_get_parent(device->implicit_swapchain);
+ implicit_swapchain->swap_interval
= wined3dswapinterval_from_d3d(present_parameters->FullScreen_PresentationInterval);
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_POINTSIZE_MIN, 0);
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ZENABLE,
@@ -929,6 +932,7 @@ static HRESULT WINAPI d3d8_device_Present(IDirect3DDevice8 *iface, const RECT *s
const RECT *dst_rect, HWND dst_window_override, const RGNDATA *dirty_region)
{
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
+ struct d3d8_swapchain *implicit_swapchain;
TRACE("iface %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p.\n",
iface, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect), dst_window_override, dirty_region);
@@ -938,7 +942,8 @@ static HRESULT WINAPI d3d8_device_Present(IDirect3DDevice8 *iface, const RECT *s
* shows a framerate on Windows in applications that only call the device
* method, like e.g. the dx8 sdk samples. The conclusion is that native
* calls the swapchain's public method from the device. */
- return IDirect3DSwapChain8_Present(&device->implicit_swapchain->IDirect3DSwapChain8_iface,
+ implicit_swapchain = wined3d_swapchain_get_parent(device->implicit_swapchain);
+ return IDirect3DSwapChain8_Present(&implicit_swapchain->IDirect3DSwapChain8_iface,
src_rect, dst_rect, dst_window_override, dirty_region);
}
@@ -946,7 +951,6 @@ static HRESULT WINAPI d3d8_device_GetBackBuffer(IDirect3DDevice8 *iface,
UINT backbuffer_idx, D3DBACKBUFFER_TYPE backbuffer_type, IDirect3DSurface8 **backbuffer)
{
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
- struct wined3d_swapchain *wined3d_swapchain;
struct wined3d_texture *wined3d_texture;
struct d3d8_surface *surface_impl;
@@ -958,8 +962,7 @@ static HRESULT WINAPI d3d8_device_GetBackBuffer(IDirect3DDevice8 *iface,
/* No need to check for backbuffer == NULL, Windows crashes in that case. */
wined3d_mutex_lock();
- wined3d_swapchain = device->implicit_swapchain->wined3d_swapchain;
- if (!(wined3d_texture = wined3d_swapchain_get_back_buffer(wined3d_swapchain, backbuffer_idx)))
+ if (!(wined3d_texture = wined3d_swapchain_get_back_buffer(device->implicit_swapchain, backbuffer_idx)))
{
wined3d_mutex_unlock();
*backbuffer = NULL;
@@ -1387,7 +1390,7 @@ static HRESULT WINAPI d3d8_device_GetFrontBuffer(IDirect3DDevice8 *iface, IDirec
}
wined3d_mutex_lock();
- hr = wined3d_swapchain_get_front_buffer_data(device->implicit_swapchain->wined3d_swapchain,
+ hr = wined3d_swapchain_get_front_buffer_data(device->implicit_swapchain,
dst_impl->wined3d_texture, dst_impl->sub_resource_idx);
wined3d_mutex_unlock();
@@ -3532,29 +3535,6 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic
return hr;
}
-static HRESULT CDECL device_parent_create_swapchain(struct wined3d_device_parent *device_parent,
- struct wined3d_swapchain_desc *desc, struct wined3d_swapchain **swapchain)
-{
- struct d3d8_device *device = device_from_device_parent(device_parent);
- struct d3d8_swapchain *d3d_swapchain;
- HRESULT hr;
-
- TRACE("device_parent %p, desc %p, swapchain %p.\n", device_parent, desc, swapchain);
-
- if (FAILED(hr = d3d8_swapchain_create(device, desc, WINED3D_SWAP_INTERVAL_DEFAULT, &d3d_swapchain)))
- {
- WARN("Failed to create swapchain, hr %#x.\n", hr);
- *swapchain = NULL;
- return hr;
- }
-
- *swapchain = d3d_swapchain->wined3d_swapchain;
- wined3d_swapchain_incref(*swapchain);
- IDirect3DSwapChain8_Release(&d3d_swapchain->IDirect3DSwapChain8_iface);
-
- return hr;
-}
-
static const struct wined3d_device_parent_ops d3d8_wined3d_device_parent_ops =
{
device_parent_wined3d_device_created,
@@ -3562,7 +3542,6 @@ static const struct wined3d_device_parent_ops d3d8_wined3d_device_parent_ops =
device_parent_activate,
device_parent_texture_sub_resource_created,
device_parent_create_swapchain_texture,
- device_parent_create_swapchain,
};
static void setup_fpu(void)
@@ -3587,6 +3566,7 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine
{
struct wined3d_swapchain_desc swapchain_desc;
struct wined3d_swapchain *wined3d_swapchain;
+ struct d3d8_swapchain *d3d_swapchain;
HRESULT hr;
static const enum wined3d_feature_level feature_levels[] =
@@ -3654,10 +3634,12 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine
heap_free(device->handle_table.entries);
return D3DERR_INVALIDCALL;
}
+ swapchain_desc.flags |= WINED3D_SWAPCHAIN_IMPLICIT;
- if (FAILED(hr = wined3d_device_init_3d(device->wined3d_device, &swapchain_desc)))
+ if (FAILED(hr = d3d8_swapchain_create(device, &swapchain_desc,
+ wined3dswapinterval_from_d3d(parameters->FullScreen_PresentationInterval), &d3d_swapchain)))
{
- WARN("Failed to initialize 3D, hr %#x.\n", hr);
+ WARN("Failed to create implicit swapchain, hr %#x.\n", hr);
wined3d_device_release_focus_window(device->wined3d_device);
wined3d_device_decref(device->wined3d_device);
wined3d_mutex_unlock();
@@ -3665,6 +3647,10 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine
return hr;
}
+ wined3d_swapchain = d3d_swapchain->wined3d_swapchain;
+ wined3d_swapchain_incref(wined3d_swapchain);
+ IDirect3DSwapChain8_Release(&d3d_swapchain->IDirect3DSwapChain8_iface);
+
wined3d_device_set_render_state(device->wined3d_device,
WINED3D_RS_ZENABLE, !!swapchain_desc.enable_auto_depth_stencil);
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_POINTSIZE_MIN, 0);
@@ -3681,10 +3667,7 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine
goto err;
}
- wined3d_swapchain = wined3d_device_get_swapchain(device->wined3d_device, 0);
- device->implicit_swapchain = wined3d_swapchain_get_parent(wined3d_swapchain);
- device->implicit_swapchain->swap_interval
- = wined3dswapinterval_from_d3d(parameters->FullScreen_PresentationInterval);
+ device->implicit_swapchain = wined3d_swapchain;
device->d3d_parent = &parent->IDirect3D8_iface;
IDirect3D8_AddRef(device->d3d_parent);
@@ -3693,7 +3676,7 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine
err:
wined3d_mutex_lock();
- wined3d_device_uninit_3d(device->wined3d_device);
+ wined3d_swapchain_decref(wined3d_swapchain);
wined3d_device_release_focus_window(device->wined3d_device);
wined3d_device_decref(device->wined3d_device);
wined3d_mutex_unlock();
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h
index b07d72a0662..8ee521b14b0 100644
--- a/dlls/d3d9/d3d9_private.h
+++ b/dlls/d3d9/d3d9_private.h
@@ -116,7 +116,7 @@ struct d3d9_device
unsigned int max_user_clip_planes;
UINT implicit_swapchain_count;
- struct d3d9_swapchain **implicit_swapchains;
+ struct wined3d_swapchain **implicit_swapchains;
};
HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wined3d *wined3d,
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index f7f9358913d..999969119e3 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -599,9 +599,12 @@ static ULONG WINAPI DECLSPEC_HOTPATCH d3d9_device_Release(IDirect3DDevice9Ex *if
if (device->index_buffer)
wined3d_buffer_decref(device->index_buffer);
+ for (i = 0; i < device->implicit_swapchain_count; ++i)
+ {
+ wined3d_swapchain_decref(device->implicit_swapchains[i]);
+ }
heap_free(device->implicit_swapchains);
- wined3d_device_uninit_3d(device->wined3d_device);
wined3d_device_release_focus_window(device->wined3d_device);
wined3d_device_decref(device->wined3d_device);
wined3d_mutex_unlock();
@@ -838,6 +841,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_GetSwapChain(IDirect3DDevice
UINT swapchain_idx, IDirect3DSwapChain9 **swapchain)
{
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
+ struct d3d9_swapchain *d3d9_swapchain;
HRESULT hr;
TRACE("iface %p, swapchain_idx %u, swapchain %p.\n", iface, swapchain_idx, swapchain);
@@ -845,7 +849,8 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_GetSwapChain(IDirect3DDevice
wined3d_mutex_lock();
if (swapchain_idx < device->implicit_swapchain_count)
{
- *swapchain = (IDirect3DSwapChain9 *)&device->implicit_swapchains[swapchain_idx]->IDirect3DSwapChain9Ex_iface;
+ d3d9_swapchain = wined3d_swapchain_get_parent(device->implicit_swapchains[swapchain_idx]);
+ *swapchain = (IDirect3DSwapChain9 *)&d3d9_swapchain->IDirect3DSwapChain9Ex_iface;
IDirect3DSwapChain9Ex_AddRef(*swapchain);
hr = D3D_OK;
}
@@ -924,15 +929,13 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource)
static HRESULT d3d9_device_get_swapchains(struct d3d9_device *device)
{
UINT i, new_swapchain_count = wined3d_device_get_swapchain_count(device->wined3d_device);
- struct wined3d_swapchain *wined3d_swapchain;
if (!(device->implicit_swapchains = heap_alloc(new_swapchain_count * sizeof(*device->implicit_swapchains))))
return E_OUTOFMEMORY;
for (i = 0; i < new_swapchain_count; ++i)
{
- wined3d_swapchain = wined3d_device_get_swapchain(device->wined3d_device, i);
- device->implicit_swapchains[i] = wined3d_swapchain_get_parent(wined3d_swapchain);
+ device->implicit_swapchains[i] = wined3d_device_get_swapchain(device->wined3d_device, i);
}
device->implicit_swapchain_count = new_swapchain_count;
@@ -946,6 +949,7 @@ static HRESULT d3d9_device_reset(struct d3d9_device *device,
struct wined3d_swapchain_desc swapchain_desc;
struct wined3d_display_mode wined3d_mode;
struct wined3d_rendertarget_view *rtv;
+ struct d3d9_swapchain *d3d9_swapchain;
unsigned int i;
HRESULT hr;
@@ -966,6 +970,7 @@ static HRESULT d3d9_device_reset(struct d3d9_device *device,
if (!wined3d_swapchain_desc_from_present_parameters(&swapchain_desc, present_parameters, extended))
return D3DERR_INVALIDCALL;
+ swapchain_desc.flags |= WINED3D_SWAPCHAIN_IMPLICIT;
wined3d_mutex_lock();
@@ -1002,9 +1007,10 @@ static HRESULT d3d9_device_reset(struct d3d9_device *device,
}
else
{
- device->implicit_swapchains[0]->swap_interval
+ d3d9_swapchain = wined3d_swapchain_get_parent(device->implicit_swapchains[0]);
+ d3d9_swapchain->swap_interval
= wined3dswapinterval_from_d3d(present_parameters->PresentationInterval);
- wined3d_swapchain_get_desc(device->implicit_swapchains[0]->wined3d_swapchain, &swapchain_desc);
+ wined3d_swapchain_get_desc(d3d9_swapchain->wined3d_swapchain, &swapchain_desc);
present_parameters->BackBufferWidth = swapchain_desc.backbuffer_width;
present_parameters->BackBufferHeight = swapchain_desc.backbuffer_height;
present_parameters->BackBufferFormat = d3dformat_from_wined3dformat(swapchain_desc.backbuffer_format);
@@ -1058,7 +1064,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_Present(IDirect3DDevice9Ex *
wined3d_mutex_lock();
for (i = 0; i < device->implicit_swapchain_count; ++i)
{
- swapchain = device->implicit_swapchains[i];
+ swapchain = wined3d_swapchain_get_parent(device->implicit_swapchains[i]);
if (FAILED(hr = wined3d_swapchain_present(swapchain->wined3d_swapchain,
src_rect, dst_rect, dst_window_override, swapchain->swap_interval, 0)))
{
@@ -1075,6 +1081,7 @@ static HRESULT WINAPI d3d9_device_GetBackBuffer(IDirect3DDevice9Ex *iface, UINT
UINT backbuffer_idx, D3DBACKBUFFER_TYPE backbuffer_type, IDirect3DSurface9 **backbuffer)
{
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
+ struct d3d9_swapchain *d3d9_swapchain;
HRESULT hr;
TRACE("iface %p, swapchain %u, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n",
@@ -1093,7 +1100,8 @@ static HRESULT WINAPI d3d9_device_GetBackBuffer(IDirect3DDevice9Ex *iface, UINT
return D3DERR_INVALIDCALL;
}
- hr = IDirect3DSwapChain9Ex_GetBackBuffer(&device->implicit_swapchains[swapchain]->IDirect3DSwapChain9Ex_iface,
+ d3d9_swapchain = wined3d_swapchain_get_parent(device->implicit_swapchains[swapchain]);
+ hr = IDirect3DSwapChain9Ex_GetBackBuffer(&d3d9_swapchain->IDirect3DSwapChain9Ex_iface,
backbuffer_idx, backbuffer_type, backbuffer);
wined3d_mutex_unlock();
@@ -1645,7 +1653,7 @@ static HRESULT WINAPI d3d9_device_GetFrontBufferData(IDirect3DDevice9Ex *iface,
wined3d_mutex_lock();
if (swapchain < device->implicit_swapchain_count)
- hr = wined3d_swapchain_get_front_buffer_data(device->implicit_swapchains[swapchain]->wined3d_swapchain,
+ hr = wined3d_swapchain_get_front_buffer_data(device->implicit_swapchains[swapchain],
dst_impl->wined3d_texture, dst_impl->sub_resource_idx);
wined3d_mutex_unlock();
@@ -3953,7 +3961,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_PresentEx(IDirect3DDevice9Ex
wined3d_mutex_lock();
for (i = 0; i < device->implicit_swapchain_count; ++i)
{
- swapchain = device->implicit_swapchains[i];
+ swapchain = wined3d_swapchain_get_parent(device->implicit_swapchains[i]);
if (FAILED(hr = wined3d_swapchain_present(swapchain->wined3d_swapchain,
src_rect, dst_rect, dst_window_override, swapchain->swap_interval, flags)))
{
@@ -4033,7 +4041,7 @@ static HRESULT WINAPI d3d9_device_CheckDeviceState(IDirect3DDevice9Ex *iface, HW
TRACE("iface %p, dst_window %p.\n", iface, dst_window);
wined3d_mutex_lock();
- wined3d_swapchain_get_desc(device->implicit_swapchains[0]->wined3d_swapchain, &swapchain_desc);
+ wined3d_swapchain_get_desc(device->implicit_swapchains[0], &swapchain_desc);
wined3d_mutex_unlock();
if (swapchain_desc.windowed)
@@ -4397,29 +4405,6 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic
return hr;
}
-static HRESULT CDECL device_parent_create_swapchain(struct wined3d_device_parent *device_parent,
- struct wined3d_swapchain_desc *desc, struct wined3d_swapchain **swapchain)
-{
- struct d3d9_device *device = device_from_device_parent(device_parent);
- struct d3d9_swapchain *d3d_swapchain;
- HRESULT hr;
-
- TRACE("device_parent %p, desc %p, swapchain %p\n", device_parent, desc, swapchain);
-
- if (FAILED(hr = d3d9_swapchain_create(device, desc, WINED3D_SWAP_INTERVAL_DEFAULT, &d3d_swapchain)))
- {
- WARN("Failed to create swapchain, hr %#x.\n", hr);
- *swapchain = NULL;
- return hr;
- }
-
- *swapchain = d3d_swapchain->wined3d_swapchain;
- wined3d_swapchain_incref(*swapchain);
- IDirect3DSwapChain9Ex_Release(&d3d_swapchain->IDirect3DSwapChain9Ex_iface);
-
- return hr;
-}
-
static const struct wined3d_device_parent_ops d3d9_wined3d_device_parent_ops =
{
device_parent_wined3d_device_created,
@@ -4427,7 +4412,6 @@ static const struct wined3d_device_parent_ops d3d9_wined3d_device_parent_ops =
device_parent_activate,
device_parent_texture_sub_resource_created,
device_parent_create_swapchain_texture,
- device_parent_create_swapchain,
};
static void setup_fpu(void)
@@ -4452,6 +4436,7 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode)
{
struct wined3d_swapchain_desc *swapchain_desc;
+ struct d3d9_swapchain *d3d_swapchain;
struct wined3d_caps caps;
unsigned i, count = 1;
HRESULT hr;
@@ -4537,11 +4522,13 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
wined3d_mutex_unlock();
return D3DERR_INVALIDCALL;
}
+ swapchain_desc[i].flags |= WINED3D_SWAPCHAIN_IMPLICIT;
}
- if (FAILED(hr = wined3d_device_init_3d(device->wined3d_device, swapchain_desc)))
+ if (FAILED(hr = d3d9_swapchain_create(device, swapchain_desc,
+ wined3dswapinterval_from_d3d(parameters->PresentationInterval), &d3d_swapchain)))
{
- WARN("Failed to initialize 3D, hr %#x.\n", hr);
+ WARN("Failed to create swapchain, hr %#x.\n", hr);
wined3d_device_release_focus_window(device->wined3d_device);
heap_free(swapchain_desc);
wined3d_device_decref(device->wined3d_device);
@@ -4549,22 +4536,20 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
return hr;
}
+ wined3d_swapchain_incref(d3d_swapchain->wined3d_swapchain);
+ IDirect3DSwapChain9Ex_Release(&d3d_swapchain->IDirect3DSwapChain9Ex_iface);
+
wined3d_device_set_render_state(device->wined3d_device,
WINED3D_RS_ZENABLE, !!swapchain_desc->enable_auto_depth_stencil);
if (FAILED(hr = d3d9_device_get_swapchains(device)))
{
- wined3d_device_uninit_3d(device->wined3d_device);
+ wined3d_swapchain_decref(d3d_swapchain->wined3d_swapchain);
wined3d_device_release_focus_window(device->wined3d_device);
wined3d_device_decref(device->wined3d_device);
wined3d_mutex_unlock();
return E_OUTOFMEMORY;
}
- for (i = 0; i < device->implicit_swapchain_count; ++i)
- {
- device->implicit_swapchains[i]->swap_interval
- = wined3dswapinterval_from_d3d(parameters[i].PresentationInterval);
- }
for (i = 0; i < count; ++i)
{
@@ -4583,7 +4568,7 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
ERR("Failed to allocate FVF vertex declaration map memory.\n");
wined3d_mutex_lock();
heap_free(device->implicit_swapchains);
- wined3d_device_uninit_3d(device->wined3d_device);
+ wined3d_swapchain_decref(d3d_swapchain->wined3d_swapchain);
wined3d_device_release_focus_window(device->wined3d_device);
wined3d_device_decref(device->wined3d_device);
wined3d_mutex_unlock();
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index b2097726076..b005f10826d 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -366,12 +366,10 @@ static ULONG WINAPI d3d1_AddRef(IDirect3D *iface)
static void ddraw_destroy_swapchain(struct ddraw *ddraw)
{
unsigned int i;
- HRESULT hr;
TRACE("Destroying the swapchain.\n");
wined3d_swapchain_decref(ddraw->wined3d_swapchain);
- ddraw->wined3d_swapchain = NULL;
for (i = 0; i < ddraw->numConvertedDecls; ++i)
{
@@ -380,8 +378,8 @@ static void ddraw_destroy_swapchain(struct ddraw *ddraw)
heap_free(ddraw->decls);
ddraw->numConvertedDecls = 0;
- if (FAILED(hr = wined3d_device_uninit_3d(ddraw->wined3d_device)))
- ERR("Failed to uninit 3D, hr %#x.\n", hr);
+ wined3d_swapchain_decref(ddraw->wined3d_swapchain);
+ ddraw->wined3d_swapchain = NULL;
/* Free the d3d window if one was created. */
if (ddraw->d3d_window && ddraw->d3d_window != ddraw->dest_window)
@@ -551,16 +549,35 @@ static HRESULT ddraw_set_focus_window(struct ddraw *ddraw, HWND window)
return DD_OK;
}
-static HRESULT ddraw_attach_d3d_device(struct ddraw *ddraw,
- struct wined3d_swapchain_desc *swapchain_desc)
+static HRESULT ddraw_attach_d3d_device(struct ddraw *ddraw, HWND window,
+ BOOL windowed, struct wined3d_swapchain **wined3d_swapchain)
{
- HWND window = swapchain_desc->device_window;
+ struct wined3d_swapchain_desc swapchain_desc;
+ struct wined3d_display_mode mode;
HRESULT hr;
TRACE("ddraw %p.\n", ddraw);
+ if (FAILED(hr = wined3d_get_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &mode, NULL)))
+ {
+ ERR("Failed to get display mode.\n");
+ return hr;
+ }
+
+ memset(&swapchain_desc, 0, sizeof(swapchain_desc));
+ swapchain_desc.backbuffer_width = mode.width;
+ swapchain_desc.backbuffer_height = mode.height;
+ swapchain_desc.backbuffer_format = mode.format_id;
+ swapchain_desc.backbuffer_bind_flags = 0;
+ swapchain_desc.backbuffer_count = 1;
+ swapchain_desc.swap_effect = WINED3D_SWAP_EFFECT_DISCARD;
+ swapchain_desc.device_window = window;
+ swapchain_desc.windowed = windowed;
+ swapchain_desc.flags = WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH | WINED3D_SWAPCHAIN_IMPLICIT;
+
if (ddraw->flags & DDRAW_NO3D)
- return wined3d_device_init_3d(ddraw->wined3d_device, swapchain_desc);
+ return wined3d_swapchain_create(ddraw->wined3d_device, &swapchain_desc,
+ NULL, &ddraw_null_wined3d_parent_ops, wined3d_swapchain);
if (!window || window == GetDesktopWindow())
{
@@ -576,7 +593,7 @@ static HRESULT ddraw_attach_d3d_device(struct ddraw *ddraw,
ShowWindow(window, SW_HIDE); /* Just to be sure */
WARN("No window for the Direct3DDevice, created hidden window %p.\n", window);
- swapchain_desc->device_window = window;
+ swapchain_desc.device_window = window;
}
else
{
@@ -587,9 +604,12 @@ static HRESULT ddraw_attach_d3d_device(struct ddraw *ddraw,
/* Set this NOW, otherwise creating the depth stencil surface will cause a
* recursive loop until ram or emulated video memory is full. */
ddraw->flags |= DDRAW_D3D_INITIALIZED;
- if (FAILED(hr = wined3d_device_init_3d(ddraw->wined3d_device, swapchain_desc)))
+ if (FAILED(hr = wined3d_swapchain_create(ddraw->wined3d_device, &swapchain_desc,
+ NULL, &ddraw_null_wined3d_parent_ops, wined3d_swapchain)))
{
ddraw->flags &= ~DDRAW_D3D_INITIALIZED;
+ DestroyWindow(window);
+ ddraw->d3d_window = NULL;
return hr;
}
@@ -598,7 +618,9 @@ static HRESULT ddraw_attach_d3d_device(struct ddraw *ddraw,
{
ERR("Error allocating an array for the converted vertex decls.\n");
ddraw->declArraySize = 0;
- hr = wined3d_device_uninit_3d(ddraw->wined3d_device);
+ wined3d_swapchain_decref(*wined3d_swapchain);
+ DestroyWindow(window);
+ ddraw->d3d_window = NULL;
return E_OUTOFMEMORY;
}
@@ -609,40 +631,21 @@ static HRESULT ddraw_attach_d3d_device(struct ddraw *ddraw,
static HRESULT ddraw_create_swapchain(struct ddraw *ddraw, HWND window, BOOL windowed)
{
- struct wined3d_swapchain_desc swapchain_desc;
- struct wined3d_display_mode mode;
- HRESULT hr = WINED3D_OK;
+ HRESULT hr;
- if (FAILED(hr = wined3d_get_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &mode, NULL)))
+ if (ddraw->wined3d_swapchain)
{
- ERR("Failed to get display mode.\n");
- return hr;
+ ERR("Swapchain already created.\n");
+ return E_FAIL;
}
- memset(&swapchain_desc, 0, sizeof(swapchain_desc));
- swapchain_desc.backbuffer_width = mode.width;
- swapchain_desc.backbuffer_height = mode.height;
- swapchain_desc.backbuffer_format = mode.format_id;
- swapchain_desc.backbuffer_bind_flags = 0;
- swapchain_desc.backbuffer_count = 1;
- swapchain_desc.swap_effect = WINED3D_SWAP_EFFECT_DISCARD;
- swapchain_desc.device_window = window;
- swapchain_desc.windowed = windowed;
- swapchain_desc.flags = WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH;
-
- if (FAILED(hr = ddraw_attach_d3d_device(ddraw, &swapchain_desc)))
+ if (FAILED(hr = ddraw_attach_d3d_device(ddraw, window, windowed, &ddraw->wined3d_swapchain)))
{
ERR("Failed to create swapchain, hr %#x.\n", hr);
return hr;
}
-
- if (!(ddraw->wined3d_swapchain = wined3d_device_get_swapchain(ddraw->wined3d_device, 0)))
- {
- ERR("Failed to get swapchain.\n");
- return DDERR_INVALIDPARAMS;
- }
-
wined3d_swapchain_incref(ddraw->wined3d_swapchain);
+
ddraw_set_swapchain_window(ddraw, window);
if (ddraw->primary && ddraw->primary->palette)
@@ -4967,27 +4970,6 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic
return hr;
}
-static HRESULT CDECL device_parent_create_swapchain(struct wined3d_device_parent *device_parent,
- struct wined3d_swapchain_desc *desc, struct wined3d_swapchain **swapchain)
-{
- struct ddraw *ddraw = ddraw_from_device_parent(device_parent);
- HRESULT hr;
-
- TRACE("device_parent %p, desc %p, swapchain %p.\n", device_parent, desc, swapchain);
-
- if (ddraw->wined3d_swapchain)
- {
- ERR("Swapchain already created.\n");
- return E_FAIL;
- }
-
- if (FAILED(hr = wined3d_swapchain_create(ddraw->wined3d_device, desc, NULL,
- &ddraw_null_wined3d_parent_ops, swapchain)))
- WARN("Failed to create swapchain, hr %#x.\n", hr);
-
- return hr;
-}
-
static const struct wined3d_device_parent_ops ddraw_wined3d_device_parent_ops =
{
device_parent_wined3d_device_created,
@@ -4995,7 +4977,6 @@ static const struct wined3d_device_parent_ops ddraw_wined3d_device_parent_ops =
device_parent_activate,
device_parent_texture_sub_resource_created,
device_parent_create_swapchain_texture,
- device_parent_create_swapchain,
};
HRESULT ddraw_init(struct ddraw *ddraw, DWORD flags, enum wined3d_device_type device_type)
diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c
index c7d663f953b..d6dd0418c47 100644
--- a/dlls/dxgi/device.c
+++ b/dlls/dxgi/device.c
@@ -90,7 +90,7 @@ static ULONG STDMETHODCALLTYPE dxgi_device_Release(IWineDXGIDevice *iface)
if (device->child_layer)
IUnknown_Release(device->child_layer);
wined3d_mutex_lock();
- wined3d_device_uninit_3d(device->wined3d_device);
+ wined3d_swapchain_decref(device->implicit_swapchain);
wined3d_device_decref(device->wined3d_device);
wined3d_mutex_unlock();
IWineDXGIAdapter_Release(device->adapter);
@@ -352,35 +352,6 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *ifa
return S_OK;
}
-static HRESULT STDMETHODCALLTYPE dxgi_device_create_swapchain(IWineDXGIDevice *iface,
- struct wined3d_swapchain_desc *desc, BOOL implicit, struct wined3d_swapchain **wined3d_swapchain)
-{
- struct dxgi_device *device = impl_from_IWineDXGIDevice(iface);
- struct d3d11_swapchain *object;
- HRESULT hr;
-
- TRACE("iface %p, desc %p, wined3d_swapchain %p.\n",
- iface, desc, wined3d_swapchain);
-
- if (!(object = heap_alloc_zero(sizeof(*object))))
- {
- ERR("Failed to allocate DXGI swapchain object memory\n");
- return E_OUTOFMEMORY;
- }
-
- if (FAILED(hr = d3d11_swapchain_init(object, device, desc, implicit)))
- {
- WARN("Failed to initialize swapchain, hr %#x.\n", hr);
- heap_free(object);
- return hr;
- }
-
- TRACE("Created IDXGISwapChain %p.\n", object);
- *wined3d_swapchain = object->wined3d_swapchain;
-
- return S_OK;
-}
-
static const struct IWineDXGIDeviceVtbl dxgi_device_vtbl =
{
/* IUnknown methods */
@@ -407,7 +378,6 @@ static const struct IWineDXGIDeviceVtbl dxgi_device_vtbl =
dxgi_device_EnqueueSetEvent,
/* IWineDXGIDevice methods */
dxgi_device_create_surface,
- dxgi_device_create_swapchain,
};
static inline struct dxgi_device *impl_from_IWineDXGISwapChainFactory(IWineDXGISwapChainFactory *iface)
@@ -448,8 +418,8 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_factory_create_swapchain(IWineDX
const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc, IDXGIOutput *output, IDXGISwapChain1 **swapchain)
{
struct dxgi_device *device = impl_from_IWineDXGISwapChainFactory(iface);
- struct wined3d_swapchain *wined3d_swapchain;
struct wined3d_swapchain_desc wined3d_desc;
+ struct d3d11_swapchain *object;
HRESULT hr;
TRACE("iface %p, factory %p, window %p, desc %p, fullscreen_desc %p, output %p, swapchain %p.\n",
@@ -498,16 +468,22 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_factory_create_swapchain(IWineDX
wined3d_desc.refresh_rate = fullscreen_desc ? dxgi_rational_to_uint(&fullscreen_desc->RefreshRate) : 0;
wined3d_desc.auto_restore_display_mode = TRUE;
- if (FAILED(hr = dxgi_device_create_swapchain(&device->IWineDXGIDevice_iface,
- &wined3d_desc, FALSE, &wined3d_swapchain)))
+ if (!(object = heap_alloc_zero(sizeof(*object))))
+ {
+ ERR("Failed to allocate swapchain memory.\n");
+ return E_OUTOFMEMORY;
+ }
+
+ if (FAILED(hr = d3d11_swapchain_init(object, device, &wined3d_desc, FALSE)))
{
- WARN("Failed to create swapchain, hr %#x.\n", hr);
+ WARN("Failed to initialise swapchain, hr %#x.\n", hr);
+ heap_free(object);
return hr;
}
- wined3d_mutex_lock();
- *swapchain = wined3d_swapchain_get_parent(wined3d_swapchain);
- wined3d_mutex_unlock();
+ TRACE("Created swapchain %p.\n", object);
+
+ *swapchain = &object->IDXGISwapChain1_iface;
return S_OK;
}
@@ -527,6 +503,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
struct wined3d_device_parent *wined3d_device_parent;
struct wined3d_swapchain_desc swapchain_desc;
IWineDXGIDeviceParent *dxgi_device_parent;
+ struct d3d11_swapchain *swapchain;
struct dxgi_adapter *dxgi_adapter;
struct dxgi_factory *dxgi_factory;
void *layer_base;
@@ -589,15 +566,32 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
swapchain_desc.swap_effect = WINED3D_SWAP_EFFECT_DISCARD;
swapchain_desc.device_window = dxgi_factory_get_device_window(dxgi_factory);
swapchain_desc.windowed = TRUE;
- if (FAILED(hr = wined3d_device_init_3d(device->wined3d_device, &swapchain_desc)))
+ swapchain_desc.flags = WINED3D_SWAPCHAIN_IMPLICIT;
+
+ if (!(swapchain = heap_alloc_zero(sizeof(*swapchain))))
{
- ERR("Failed to initialize 3D, hr %#x.\n", hr);
+ ERR("Failed to allocate swapchain memory.\n");
+ wined3d_device_decref(device->wined3d_device);
+ IUnknown_Release(device->child_layer);
+ wined3d_private_store_cleanup(&device->private_store);
+ wined3d_mutex_unlock();
+ return E_OUTOFMEMORY;
+ }
+
+ if (FAILED(hr = d3d11_swapchain_init(swapchain, device, &swapchain_desc, TRUE)))
+ {
+ WARN("Failed to initialize swapchain, hr %#x.\n", hr);
+ heap_free(swapchain);
wined3d_device_decref(device->wined3d_device);
IUnknown_Release(device->child_layer);
wined3d_private_store_cleanup(&device->private_store);
wined3d_mutex_unlock();
return hr;
}
+ device->implicit_swapchain = swapchain->wined3d_swapchain;
+
+ TRACE("Created swapchain %p.\n", swapchain);
+
wined3d_mutex_unlock();
device->adapter = &dxgi_adapter->IWineDXGIAdapter_iface;
diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h
index 1461e3c3af7..5c5775ca377 100644
--- a/dlls/dxgi/dxgi_private.h
+++ b/dlls/dxgi/dxgi_private.h
@@ -130,6 +130,7 @@ struct dxgi_device
LONG refcount;
struct wined3d_private_store private_store;
struct wined3d_device *wined3d_device;
+ struct wined3d_swapchain *implicit_swapchain;
IWineDXGIAdapter *adapter;
};
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index a0c44b5d41c..361ac6b1e36 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -486,6 +486,9 @@ ULONG CDECL wined3d_device_decref(struct wined3d_device *device)
{
UINT i;
+ if (device->swapchain_count)
+ wined3d_device_uninit_3d(device);
+
wined3d_stateblock_state_cleanup(&device->stateblock_state);
wined3d_cs_destroy(device->cs);
@@ -1067,30 +1070,19 @@ static HRESULT wined3d_device_create_primary_opengl_context(struct wined3d_devic
return WINED3D_OK;
}
-HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
- struct wined3d_swapchain_desc *swapchain_desc)
+HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
{
static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f};
- struct wined3d_swapchain *swapchain = NULL;
+ const struct wined3d_swapchain_desc *swapchain_desc;
DWORD clear_flags = 0;
HRESULT hr;
- TRACE("device %p, swapchain_desc %p.\n", device, swapchain_desc);
+ TRACE("device %p, swapchain %p.\n", device, swapchain);
if (device->d3d_initialized)
return WINED3DERR_INVALIDCALL;
- memset(device->fb.render_targets, 0, sizeof(device->fb.render_targets));
-
- /* Setup the implicit swapchain. This also initializes a context. */
- TRACE("Creating implicit swapchain.\n");
- if (FAILED(hr = device->device_parent->ops->create_swapchain(device->device_parent,
- swapchain_desc, &swapchain)))
- {
- WARN("Failed to create implicit swapchain.\n");
- goto err_out;
- }
-
+ swapchain_desc = &swapchain->desc;
if (swapchain_desc->backbuffer_count && swapchain_desc->backbuffer_bind_flags & WINED3D_BIND_RENDER_TARGET)
{
struct wined3d_resource *back_buffer = &swapchain->back_buffers[0]->resource;
@@ -1106,18 +1098,20 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
NULL, &wined3d_null_parent_ops, &device->back_buffer_view)))
{
ERR("Failed to create rendertarget view, hr %#x.\n", hr);
- goto err_out;
+ return hr;
}
}
device->swapchain_count = 1;
if (!(device->swapchains = heap_calloc(device->swapchain_count, sizeof(*device->swapchains))))
{
- ERR("Out of memory!\n");
+ ERR("Failed to allocate swapchain array.\n");
+ hr = E_OUTOFMEMORY;
goto err_out;
}
device->swapchains[0] = swapchain;
+ memset(device->fb.render_targets, 0, sizeof(device->fb.render_targets));
if (device->wined3d->flags & WINED3D_NO3D)
{
if (!(device->blitter = wined3d_cpu_blitter_create()))
@@ -1125,6 +1119,7 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
ERR("Failed to create CPU blitter.\n");
heap_free(device->swapchains);
device->swapchain_count = 0;
+ hr = E_FAIL;
goto err_out;
}
}
@@ -1156,11 +1151,13 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
err_out:
heap_free(device->swapchains);
+ device->swapchains = NULL;
device->swapchain_count = 0;
if (device->back_buffer_view)
+ {
wined3d_rendertarget_view_decref(device->back_buffer_view);
- if (swapchain)
- wined3d_swapchain_decref(swapchain);
+ device->back_buffer_view = NULL;
+ }
return hr;
}
@@ -1172,24 +1169,42 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
wined3d_sampler_decref(sampler);
}
-HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
+void wined3d_device_uninit_3d(struct wined3d_device *device)
{
BOOL no3d = device->wined3d->flags & WINED3D_NO3D;
+ struct wined3d_rendertarget_view *view;
+ struct wined3d_texture *texture;
unsigned int i;
TRACE("device %p.\n", device);
if (!device->d3d_initialized && !no3d)
- return WINED3DERR_INVALIDCALL;
+ {
+ ERR("Called while 3D support was not initialised.\n");
+ return;
+ }
wined3d_cs_finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
- if (device->logo_texture)
- wined3d_texture_decref(device->logo_texture);
- if (device->cursor_texture)
- wined3d_texture_decref(device->cursor_texture);
+ device->swapchain_count = 0;
+
+ if ((texture = device->logo_texture))
+ {
+ device->logo_texture = NULL;
+ wined3d_texture_decref(texture);
+ }
+
+ if ((texture = device->cursor_texture))
+ {
+ device->cursor_texture = NULL;
+ wined3d_texture_decref(texture);
+ }
state_unbind_resources(&device->state);
+ for (i = 0; i < device->adapter->d3d_info.limits.max_rt_count; ++i)
+ {
+ wined3d_device_set_rendertarget_view(device, i, NULL, FALSE);
+ }
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
@@ -1198,49 +1213,31 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
else
wined3d_device_delete_opengl_contexts(device);
- if (device->fb.depth_stencil)
+ if ((view = device->fb.depth_stencil))
{
- struct wined3d_rendertarget_view *view = device->fb.depth_stencil;
-
TRACE("Releasing depth/stencil view %p.\n", view);
device->fb.depth_stencil = NULL;
wined3d_rendertarget_view_decref(view);
}
- if (device->auto_depth_stencil_view)
+ if ((view = device->auto_depth_stencil_view))
{
- struct wined3d_rendertarget_view *view = device->auto_depth_stencil_view;
-
device->auto_depth_stencil_view = NULL;
if (wined3d_rendertarget_view_decref(view))
ERR("Something's still holding the auto depth/stencil view (%p).\n", view);
}
- for (i = 0; i < device->adapter->d3d_info.limits.max_rt_count; ++i)
- {
- wined3d_device_set_rendertarget_view(device, i, NULL, FALSE);
- }
- if (device->back_buffer_view)
+ if ((view = device->back_buffer_view))
{
- wined3d_rendertarget_view_decref(device->back_buffer_view);
device->back_buffer_view = NULL;
- }
-
- for (i = 0; i < device->swapchain_count; ++i)
- {
- TRACE("Releasing the implicit swapchain %u.\n", i);
- if (wined3d_swapchain_decref(device->swapchains[i]))
- FIXME("Something's still holding the implicit swapchain.\n");
+ wined3d_rendertarget_view_decref(view);
}
heap_free(device->swapchains);
device->swapchains = NULL;
- device->swapchain_count = 0;
device->d3d_initialized = FALSE;
-
- return WINED3D_OK;
}
/* Enables thread safety in the wined3d device and its resources. Called by DirectDraw
@@ -4825,6 +4822,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
{
const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info;
struct wined3d_resource *resource, *cursor;
+ struct wined3d_rendertarget_view *view;
struct wined3d_swapchain *swapchain;
struct wined3d_view_desc view_desc;
BOOL backbuffer_resized;
@@ -4959,10 +4957,10 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
}
- if (device->auto_depth_stencil_view)
+ if ((view = device->auto_depth_stencil_view))
{
- wined3d_rendertarget_view_decref(device->auto_depth_stencil_view);
device->auto_depth_stencil_view = NULL;
+ wined3d_rendertarget_view_decref(view);
}
if (swapchain->desc.enable_auto_depth_stencil)
{
@@ -5008,10 +5006,10 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view);
}
- if (device->back_buffer_view)
+ if ((view = device->back_buffer_view))
{
- wined3d_rendertarget_view_decref(device->back_buffer_view);
device->back_buffer_view = NULL;
+ wined3d_rendertarget_view_decref(view);
}
if (swapchain->desc.backbuffer_count && swapchain->desc.backbuffer_bind_flags & WINED3D_BIND_RENDER_TARGET)
{
@@ -5057,9 +5055,8 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if (wined3d_settings.logo)
device_load_logo(device, wined3d_settings.logo);
}
- else if (device->back_buffer_view)
+ else if ((view = device->back_buffer_view))
{
- struct wined3d_rendertarget_view *view = device->back_buffer_view;
struct wined3d_state *state = &device->state;
wined3d_device_set_rendertarget_view(device, 0, view, FALSE);
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index c5060f93fc3..c1429de91b1 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -114,9 +114,14 @@ ULONG CDECL wined3d_swapchain_decref(struct wined3d_swapchain *swapchain)
if (!refcount)
{
+ struct wined3d_device *device;
+
wined3d_mutex_lock();
- wined3d_cs_finish(swapchain->device->cs, WINED3D_CS_QUEUE_DEFAULT);
+ device = swapchain->device;
+ if (device->swapchain_count && device->swapchains[0] == swapchain)
+ wined3d_device_uninit_3d(device);
+ wined3d_cs_finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
swapchain_cleanup(swapchain);
swapchain->parent_ops->wined3d_object_destroyed(swapchain->parent);
@@ -1053,6 +1058,20 @@ HRESULT CDECL wined3d_swapchain_create(struct wined3d_device *device, struct win
return hr;
}
+ if (desc->flags & WINED3D_SWAPCHAIN_IMPLICIT)
+ {
+ wined3d_mutex_lock();
+ if (FAILED(hr = wined3d_device_set_implicit_swapchain(device, object)))
+ {
+ wined3d_cs_finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
+ swapchain_cleanup(object);
+ wined3d_mutex_unlock();
+ heap_free(swapchain);
+ return hr;
+ }
+ wined3d_mutex_unlock();
+ }
+
TRACE("Created swapchain %p.\n", object);
*swapchain = object;
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 704e19db46b..040b9fc4ac1 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -120,7 +120,6 @@
@ cdecl wined3d_device_get_vs_sampler(ptr long)
@ cdecl wined3d_device_get_wined3d(ptr)
@ cdecl wined3d_device_incref(ptr)
-@ cdecl wined3d_device_init_3d(ptr ptr)
@ cdecl wined3d_device_multiply_transform(ptr long ptr)
@ cdecl wined3d_device_process_vertices(ptr long long long ptr ptr long long)
@ cdecl wined3d_device_release_focus_window(ptr)
@@ -188,7 +187,6 @@
@ cdecl wined3d_device_set_vs_sampler(ptr long ptr)
@ cdecl wined3d_device_setup_fullscreen_window(ptr ptr long long)
@ cdecl wined3d_device_show_cursor(ptr long)
-@ cdecl wined3d_device_uninit_3d(ptr)
@ cdecl wined3d_device_update_sub_resource(ptr ptr long ptr ptr long long long)
@ cdecl wined3d_device_update_texture(ptr ptr ptr)
@ cdecl wined3d_device_validate_device(ptr ptr)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index bfc911ef473..9f63f3d8d62 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3177,6 +3177,9 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
+HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device,
+ struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
+void wined3d_device_uninit_3d(struct wined3d_device *device) DECLSPEC_HIDDEN;
struct wined3d_device_gl
{
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 8a29ef63999..958ade166c0 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -902,6 +902,7 @@ enum wined3d_shader_type
#define WINED3D_SWAPCHAIN_USE_CLOSEST_MATCHING_MODE 0x00002000u
#define WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT 0x00004000u
#define WINED3D_SWAPCHAIN_GDI_COMPATIBLE 0x00008000u
+#define WINED3D_SWAPCHAIN_IMPLICIT 0x00010000u
#define WINED3DDP_MAXTEXCOORD 8
@@ -2145,8 +2146,6 @@ struct wined3d_device_parent_ops
void **parent, const struct wined3d_parent_ops **parent_ops);
HRESULT (__cdecl *create_swapchain_texture)(struct wined3d_device_parent *device_parent, void *parent,
const struct wined3d_resource_desc *desc, DWORD texture_flags, struct wined3d_texture **texture);
- HRESULT (__cdecl *create_swapchain)(struct wined3d_device_parent *device_parent,
- struct wined3d_swapchain_desc *desc, struct wined3d_swapchain **swapchain);
};
struct wined3d_private_store
@@ -2363,7 +2362,6 @@ struct wined3d_shader_resource_view * __cdecl wined3d_device_get_vs_resource_vie
struct wined3d_sampler * __cdecl wined3d_device_get_vs_sampler(const struct wined3d_device *device, UINT idx);
struct wined3d * __cdecl wined3d_device_get_wined3d(const struct wined3d_device *device);
ULONG __cdecl wined3d_device_incref(struct wined3d_device *device);
-HRESULT __cdecl wined3d_device_init_3d(struct wined3d_device *device, struct wined3d_swapchain_desc *swapchain_desc);
void __cdecl wined3d_device_multiply_transform(struct wined3d_device *device,
enum wined3d_transform_state state, const struct wined3d_matrix *matrix);
HRESULT __cdecl wined3d_device_process_vertices(struct wined3d_device *device,
@@ -2480,7 +2478,6 @@ void __cdecl wined3d_device_set_vs_resource_view(struct wined3d_device *device,
void __cdecl wined3d_device_set_vs_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler);
void __cdecl wined3d_device_setup_fullscreen_window(struct wined3d_device *device, HWND window, UINT w, UINT h);
BOOL __cdecl wined3d_device_show_cursor(struct wined3d_device *device, BOOL show);
-HRESULT __cdecl wined3d_device_uninit_3d(struct wined3d_device *device);
void __cdecl wined3d_device_update_sub_resource(struct wined3d_device *device, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int depth_pitch, unsigned int flags);
diff --git a/include/wine/winedxgi.idl b/include/wine/winedxgi.idl
index 84440901a9e..610b7c0485c 100644
--- a/include/wine/winedxgi.idl
+++ b/include/wine/winedxgi.idl
@@ -51,11 +51,6 @@ interface IWineDXGIDevice : IDXGIDevice2
[in] IUnknown *outer,
[out] void **surface
);
- HRESULT create_swapchain(
- [in] struct wined3d_swapchain_desc *desc,
- [in] BOOL implicit,
- [out] struct wined3d_swapchain **wined3d_swapchain
- );
}
[
--
2.11.0
5
7
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com>
---
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 3 ++-
dlls/ntoskrnl.exe/sync.c | 10 ++++++++++
include/ddk/wdm.h | 1 +
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index ab952e528b..141c8aa639 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -4,7 +4,7 @@
@ stub ExInitializeRundownProtection
@ stub ExInterlockedAddLargeStatistic
@ stub ExInterlockedCompareExchange64
-@ stub ExInterlockedFlushSList
+@ stdcall -fastcall -arch=i386 ExInterlockedFlushSList(ptr) NTOSKRNL_ExInterlockedFlushSList
@ stdcall -fastcall -arch=i386 ExInterlockedPopEntrySList(ptr ptr) NTOSKRNL_ExInterlockedPopEntrySList
@ stdcall -fastcall -arch=i386 ExInterlockedPushEntrySList (ptr ptr ptr) NTOSKRNL_ExInterlockedPushEntrySList
@ stub ExReInitializeRundownProtection
@@ -27,6 +27,7 @@
@ stub Exfi386InterlockedDecrementLong
@ stub Exfi386InterlockedExchangeUlong
@ stub Exfi386InterlockedIncrementLong
+@ stdcall -arch=win64 ExpInterlockedFlushSList(ptr) RtlInterlockedFlushSList
@ stdcall -arch=win64 ExpInterlockedPopEntrySList(ptr) RtlInterlockedPopEntrySList
@ stdcall -arch=win64 ExpInterlockedPushEntrySList(ptr ptr) RtlInterlockedPushEntrySList
@ stub HalExamineMBR
diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c
index fbe9dbe9da..6976b9ef9f 100644
--- a/dlls/ntoskrnl.exe/sync.c
+++ b/dlls/ntoskrnl.exe/sync.c
@@ -690,6 +690,16 @@ PSLIST_ENTRY WINAPI NTOSKRNL_ExInterlockedPushEntrySList( PSLIST_HEADER list, PS
}
+/***********************************************************************
+ * ExInterlockedFlushSList (NTOSKRNL.EXE.@)
+ */
+DEFINE_FASTCALL1_WRAPPER( NTOSKRNL_ExInterlockedFlushSList )
+PSLIST_ENTRY WINAPI NTOSKRNL_ExInterlockedFlushSList( PSLIST_HEADER list )
+{
+ return RtlInterlockedFlushSList( list );
+}
+
+
/***********************************************************************
* ExAcquireFastMutexUnsafe (NTOSKRNL.EXE.@)
*/
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index 0faf5ecd47..a66a582977 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -1528,6 +1528,7 @@ ULONG WINAPI ExGetExclusiveWaiterCount(ERESOURCE*);
ULONG WINAPI ExGetSharedWaiterCount(ERESOURCE*);
void WINAPI ExInitializeNPagedLookasideList(PNPAGED_LOOKASIDE_LIST,PALLOCATE_FUNCTION,PFREE_FUNCTION,ULONG,SIZE_T,ULONG,USHORT);
NTSTATUS WINAPI ExInitializeResourceLite(ERESOURCE*);
+PSLIST_ENTRY WINAPI ExInterlockedFlushSList(PSLIST_HEADER);
PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK);
PSLIST_ENTRY WINAPI ExInterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY,PKSPIN_LOCK);
LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList(LIST_ENTRY*,KSPIN_LOCK*);
--
2.21.0
1
0
[PATCH v2 vkd3d 1/4] build: Drop hack for stripping RPC includes from widl-generated headers.
by Józef Kucia 14 Apr '19
by Józef Kucia 14 Apr '19
14 Apr '19
From: Józef Kucia <jkucia(a)codeweavers.com>
This requires widl from Wine >= 3.20:
commit b7402ddbbecdfaa81daa657fbb5d37661f401434
Author: Józef Kucia <jkucia(a)codeweavers.com>
Date: Mon Nov 19 15:07:02 2018 +0100
widl: Guard RPC includes with #ifdef _WIN32.
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
Version 2: Add ax_compare_version.m4.
---
Makefile.am | 6 +-
configure.ac | 2 +-
m4/ax_compare_version.m4 | 177 +++++++++++++++++++++++++++++++++++++++
m4/widl.m4 | 14 ++++
4 files changed, 194 insertions(+), 5 deletions(-)
create mode 100644 m4/ax_compare_version.m4
create mode 100644 m4/widl.m4
diff --git a/Makefile.am b/Makefile.am
index 9ad7b2e3b9a5..2b5bca0871c6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -170,9 +170,7 @@ vkd3d_v_widl_1 =
EXTRA_DIST += $(widl_headers) $(widl_headers:.h=.idl)
$(widl_headers): %.h: %.idl
if HAVE_WIDL
- $(VKD3D_V_WIDL)$(WIDL) -h -o $@.tmp $<
- $(AM_V_at)$(SED) -e '/#include <rpc.h>/d' -e '/#include <rpcndr.h>/d' <$@.tmp >$@
- $(AM_V_at)$(RM) $@.tmp
+ $(VKD3D_V_WIDL)$(WIDL) -h -o $@ $<
else
@echo "widl is required to generate $@"
endif
@@ -235,7 +233,7 @@ $(CROSS32_IMPLIBS): %.cross32.a: %.cross32.def
$(AM_V_GEN)$(CROSS32_DLLTOOL) -k -m i386 --as-flags=-32 -d $< -l $@
$(CROSS32_EXEFILES): %.cross32.exe: %.c $(CROSS32_IMPLIBS) $(widl_headers)
- $(AM_V_CCLD)depbase=`echo $@ | sed 's![^/]*$$!$(DEPDIR)/&!;s!\.exe$$!!'`; \
+ $(AM_V_CCLD)depbase=`echo $@ | $(SED) 's![^/]*$$!$(DEPDIR)/&!;s!\.exe$$!!'`; \
$(CROSS32_CC) $(CROSS_CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -o $@ $< $(CROSS32_IMPLIBS) -ldxgi -lgdi32 && \
$(am__mv) $$depbase.Tpo $$depbase.Po
else
diff --git a/configure.ac b/configure.ac
index 029278126b49..28f2ac908733 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_SED
AC_PROG_MKDIR_P
-AC_CHECK_PROG([WIDL], [widl], [widl], [no])
+VKD3D_PROG_WIDL(3, 20)
AS_IF([test "x$WIDL" = "xno"], [AC_MSG_WARN([widl is required to build header files.])])
AM_INIT_AUTOMAKE([1.11 foreign silent-rules subdir-objects no-dist-gzip dist-xz -Wall -Werror])
diff --git a/m4/ax_compare_version.m4 b/m4/ax_compare_version.m4
new file mode 100644
index 000000000000..ffb4997e8b14
--- /dev/null
+++ b/m4/ax_compare_version.m4
@@ -0,0 +1,177 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_compare_version.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+#
+# DESCRIPTION
+#
+# This macro compares two version strings. Due to the various number of
+# minor-version numbers that can exist, and the fact that string
+# comparisons are not compatible with numeric comparisons, this is not
+# necessarily trivial to do in a autoconf script. This macro makes doing
+# these comparisons easy.
+#
+# The six basic comparisons are available, as well as checking equality
+# limited to a certain number of minor-version levels.
+#
+# The operator OP determines what type of comparison to do, and can be one
+# of:
+#
+# eq - equal (test A == B)
+# ne - not equal (test A != B)
+# le - less than or equal (test A <= B)
+# ge - greater than or equal (test A >= B)
+# lt - less than (test A < B)
+# gt - greater than (test A > B)
+#
+# Additionally, the eq and ne operator can have a number after it to limit
+# the test to that number of minor versions.
+#
+# eq0 - equal up to the length of the shorter version
+# ne0 - not equal up to the length of the shorter version
+# eqN - equal up to N sub-version levels
+# neN - not equal up to N sub-version levels
+#
+# When the condition is true, shell commands ACTION-IF-TRUE are run,
+# otherwise shell commands ACTION-IF-FALSE are run. The environment
+# variable 'ax_compare_version' is always set to either 'true' or 'false'
+# as well.
+#
+# Examples:
+#
+# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
+# AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
+#
+# would both be true.
+#
+# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
+# AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
+#
+# would both be false.
+#
+# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
+#
+# would be true because it is only comparing two minor versions.
+#
+# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
+#
+# would be true because it is only comparing the lesser number of minor
+# versions of the two values.
+#
+# Note: The characters that separate the version numbers do not matter. An
+# empty string is the same as version 0. OP is evaluated by autoconf, not
+# configure, so must be a string, not a variable.
+#
+# The author would like to acknowledge Guido Draheim whose advice about
+# the m4_case and m4_ifvaln functions make this macro only include the
+# portions necessary to perform the specific comparison specified by the
+# OP argument in the final configure script.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Tim Toolan <toolan(a)ele.uri.edu>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 13
+
+dnl #########################################################################
+AC_DEFUN([AX_COMPARE_VERSION], [
+ AC_REQUIRE([AC_PROG_AWK])
+
+ # Used to indicate true or false condition
+ ax_compare_version=false
+
+ # Convert the two version strings to be compared into a format that
+ # allows a simple string comparison. The end result is that a version
+ # string of the form 1.12.5-r617 will be converted to the form
+ # 0001001200050617. In other words, each number is zero padded to four
+ # digits, and non digits are removed.
+ AS_VAR_PUSHDEF([A],[ax_compare_version_A])
+ A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ AS_VAR_PUSHDEF([B],[ax_compare_version_B])
+ B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
+ dnl # then the first line is used to determine if the condition is true.
+ dnl # The sed right after the echo is to remove any indented white space.
+ m4_case(m4_tolower($2),
+ [lt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [gt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [le],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],
+ [ge],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],[
+ dnl Split the operator from the subversion count if present.
+ m4_bmatch(m4_substr($2,2),
+ [0],[
+ # A count of zero means use the length of the shorter version.
+ # Determine the number of characters in A and B.
+ ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'`
+ ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'`
+
+ # Set A to no more than B's length and B to no more than A's length.
+ A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
+ ],
+ [[0-9]+],[
+ # A count greater than zero means use only that many subversions
+ A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ ],
+ [.+],[
+ AC_WARNING(
+ [invalid OP numeric parameter: $2])
+ ],[])
+
+ # Pad zeros at end of numbers to make same length.
+ ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
+ B="$B`echo $A | sed 's/./0/g'`"
+ A="$ax_compare_version_tmp_A"
+
+ # Check for equality or inequality as necessary.
+ m4_case(m4_tolower(m4_substr($2,0,2)),
+ [eq],[
+ test "x$A" = "x$B" && ax_compare_version=true
+ ],
+ [ne],[
+ test "x$A" != "x$B" && ax_compare_version=true
+ ],[
+ AC_WARNING([invalid OP parameter: $2])
+ ])
+ ])
+
+ AS_VAR_POPDEF([A])dnl
+ AS_VAR_POPDEF([B])dnl
+
+ dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
+ if test "$ax_compare_version" = "true" ; then
+ m4_ifvaln([$4],[$4],[:])dnl
+ m4_ifvaln([$5],[else $5])dnl
+ fi
+]) dnl AX_COMPARE_VERSION
diff --git a/m4/widl.m4 b/m4/widl.m4
new file mode 100644
index 000000000000..2849356f7c04
--- /dev/null
+++ b/m4/widl.m4
@@ -0,0 +1,14 @@
+dnl VKD3D_PROG_WIDL(major, minor)
+AC_DEFUN([VKD3D_PROG_WIDL],
+
+[AC_CHECK_PROG([WIDL], [widl], [widl], [no])
+
+AS_IF([test "x$WIDL" != "xno"],
+[AC_MSG_CHECKING([checking whether widl version >= $1.$2])
+vkd3d_widl_version=`$WIDL -V | $SED -E '/version/{s/.* version (.*)/\1/;q;}'`
+
+AX_COMPARE_VERSION([$vkd3d_widl_version], [ge], [$1.$2],
+ [AC_MSG_RESULT([yes ($vkd3d_widl_version)])],
+ [AC_MSG_RESULT([no ($vkd3d_widl_version)])
+ WIDL=no])
+])])
--
2.21.0
4
10
From: Michael Müller <michael(a)fds-team.de>
From: Michael Müller <michael(a)fds-team.de>
Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com>
---
dlls/ntdll/nt.c | 59 ++++++++++++++++++++++++++++++
dlls/ntdll/ntdll.spec | 2 +-
include/winnt.h | 5 +++
include/winternl.h | 1 +
server/process.c | 2 +-
server/protocol.def | 10 ++++++
server/security.h | 4 ++-
server/token.c | 84 +++++++++++++++++++++++++++++++++++++++++--
8 files changed, 162 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index f429349698b..8df3543d469 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -178,6 +178,65 @@ NTSTATUS WINAPI NtDuplicateToken(
return status;
}
+/******************************************************************************
+ * NtFilterToken [NTDLL.@]
+ * ZwFilterToken [NTDLL.@]
+ */
+NTSTATUS WINAPI NtFilterToken( HANDLE token, ULONG flags, TOKEN_GROUPS *disable_sids,
+ TOKEN_PRIVILEGES *privileges, TOKEN_GROUPS *restrict_sids,
+ HANDLE *new_token )
+{
+ data_size_t privileges_len = 0;
+ data_size_t sids_len = 0;
+ SID *sids = NULL;
+ NTSTATUS status;
+
+ TRACE( "(%p, 0x%08x, %p, %p, %p, %p)\n", token, flags, disable_sids, privileges,
+ restrict_sids, new_token );
+
+ if (flags)
+ FIXME( "flags %x unsupported\n", flags );
+
+ if (restrict_sids)
+ FIXME( "support for restricting sids not yet implemented\n" );
+
+ if (privileges)
+ privileges_len = privileges->PrivilegeCount * sizeof(LUID_AND_ATTRIBUTES);
+
+ if (disable_sids)
+ {
+ DWORD len, i;
+ BYTE *tmp;
+
+ for (i = 0; i < disable_sids->GroupCount; i++)
+ sids_len += RtlLengthSid( disable_sids->Groups[i].Sid );
+
+ sids = RtlAllocateHeap( GetProcessHeap(), 0, sids_len );
+ if (!sids) return STATUS_NO_MEMORY;
+
+ for (i = 0, tmp = (BYTE *)sids; i < disable_sids->GroupCount; i++, tmp += len)
+ {
+ len = RtlLengthSid( disable_sids->Groups[i].Sid );
+ memcpy( tmp, disable_sids->Groups[i].Sid, len );
+ }
+ }
+
+ SERVER_START_REQ( filter_token )
+ {
+ req->handle = wine_server_obj_handle( token );
+ req->flags = flags;
+ req->privileges_size = privileges_len;
+ wine_server_add_data( req, privileges->Privileges, privileges_len );
+ wine_server_add_data( req, sids, sids_len );
+ status = wine_server_call( req );
+ if (!status) *new_token = wine_server_ptr_handle( reply->new_handle );
+ }
+ SERVER_END_REQ;
+
+ RtlFreeHeap( GetProcessHeap(), 0, sids );
+ return status;
+}
+
/******************************************************************************
* NtOpenProcessToken [NTDLL.@]
* ZwOpenProcessToken [NTDLL.@]
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 292b0f6a9f1..d625c3fde9f 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -180,7 +180,7 @@
# @ stub NtEnumerateSystemEnvironmentValuesEx
@ stdcall NtEnumerateValueKey(long long long ptr long ptr)
@ stub NtExtendSection
-# @ stub NtFilterToken
+@ stdcall NtFilterToken(long long ptr ptr ptr ptr)
@ stdcall NtFindAtom(ptr long ptr)
@ stdcall NtFlushBuffersFile(long ptr)
@ stdcall NtFlushInstructionCache(long ptr long)
diff --git a/include/winnt.h b/include/winnt.h
index bdcd90a9ddc..88da1496cfa 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -4066,6 +4066,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
TOKEN_ADJUST_SESSIONID | \
TOKEN_ADJUST_DEFAULT )
+#define DISABLE_MAX_PRIVILEGE 0x1
+#define SANDBOX_INERT 0x2
+#define LUA_TOKEN 0x4
+#define WRITE_RESTRICTED 0x8
+
#ifndef _SECURITY_DEFINED
#define _SECURITY_DEFINED
diff --git a/include/winternl.h b/include/winternl.h
index 2b3fb947b9b..183f6d9d031 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2368,6 +2368,7 @@ NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES
NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
NTSYSAPI NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
+NTSYSAPI NTSTATUS WINAPI NtFilterToken(HANDLE,ULONG,TOKEN_GROUPS*,TOKEN_PRIVILEGES*,TOKEN_GROUPS*,HANDLE*);
NTSYSAPI NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
NTSYSAPI NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
NTSYSAPI NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
diff --git a/server/process.c b/server/process.c
index 473d3b1a27a..e062933766c 100644
--- a/server/process.c
+++ b/server/process.c
@@ -564,7 +564,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
: alloc_handle_table( process, 0 );
/* Note: for security reasons, starting a new process does not attempt
* to use the current impersonation token for the new process */
- process->token = token_duplicate( parent->token, TRUE, 0, NULL );
+ process->token = token_duplicate( parent->token, TRUE, 0, NULL, NULL, 0, NULL, 0 );
process->affinity = parent->affinity;
}
if (!process->handles || !process->token) goto error;
diff --git a/server/protocol.def b/server/protocol.def
index b6ad514463f..18bfa9bf09a 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3388,6 +3388,16 @@ enum caret_state
obj_handle_t new_handle; /* duplicated handle */
@END
+(a)REQ(filter_token)
+ obj_handle_t handle; /* handle to the token to duplicate */
+ unsigned int flags; /* flags */
+ data_size_t privileges_size; /* size of privileges */
+ VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
+ VARARG(disable_sids,SID); /* array of groups to remove from new token */
+(a)REPLY
+ obj_handle_t new_handle; /* filtered handle */
+(a)END
+
@REQ(access_check)
obj_handle_t handle; /* handle to the token */
unsigned int desired_access; /* desired access to the object */
diff --git a/server/security.h b/server/security.h
index 873bbc6afd6..bc4a8f64daa 100644
--- a/server/security.h
+++ b/server/security.h
@@ -55,7 +55,9 @@ extern const PSID security_high_label_sid;
extern struct token *token_create_admin(void);
extern int token_assign_label( struct token *token, PSID label );
extern struct token *token_duplicate( struct token *src_token, unsigned primary,
- int impersonation_level, const struct security_descriptor *sd );
+ int impersonation_level, const struct security_descriptor *sd,
+ const LUID_AND_ATTRIBUTES *filter_privileges, unsigned int priv_count,
+ const SID *filter_groups, unsigned int group_count );
extern int token_check_privileges( struct token *token, int all_required,
const LUID_AND_ATTRIBUTES *reqprivs,
unsigned int count, LUID_AND_ATTRIBUTES *usedprivs);
diff --git a/server/token.c b/server/token.c
index 5c35bcc19f6..de76939831e 100644
--- a/server/token.c
+++ b/server/token.c
@@ -285,6 +285,19 @@ static int acl_is_valid( const ACL *acl, data_size_t size )
return TRUE;
}
+static unsigned int get_sid_count( const SID *sid, data_size_t size )
+{
+ unsigned int count;
+
+ for (count = 0; size >= sizeof(SID) && security_sid_len( sid ) <= size; count++)
+ {
+ size -= security_sid_len( sid );
+ sid = (const SID *)((char *)sid + security_sid_len( sid ));
+ }
+
+ return count;
+}
+
/* checks whether all members of a security descriptor fit inside the size
* of memory specified */
int sd_is_valid( const struct security_descriptor *sd, data_size_t size )
@@ -626,8 +639,36 @@ static struct token *create_token( unsigned primary, const SID *user,
return token;
}
+static int filter_group( struct group *group, const SID *filter, unsigned int count )
+{
+ unsigned int i;
+
+ for (i = 0; i < count; i++)
+ {
+ if (security_equal_sid( &group->sid, filter )) return 1;
+ filter = (const SID *)((char *)filter + security_sid_len( filter ));
+ }
+
+ return 0;
+}
+
+static int filter_privilege( struct privilege *privilege, const LUID_AND_ATTRIBUTES *filter, unsigned int count )
+{
+ unsigned int i;
+
+ for (i = 0; i < count; i++)
+ {
+ if (!memcmp( &privilege->luid, &filter[i].Luid, sizeof(LUID) ))
+ return 1;
+ }
+
+ return 0;
+}
+
struct token *token_duplicate( struct token *src_token, unsigned primary,
- int impersonation_level, const struct security_descriptor *sd )
+ int impersonation_level, const struct security_descriptor *sd,
+ const LUID_AND_ATTRIBUTES *filter_privileges, unsigned int priv_count,
+ const SID *filter_groups, unsigned int group_count)
{
const luid_t *modified_id =
primary || (impersonation_level == src_token->impersonation_level) ?
@@ -663,6 +704,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
return NULL;
}
memcpy( newgroup, group, size );
+ if (filter_group( group, filter_groups, group_count ))
+ {
+ newgroup->enabled = 0;
+ newgroup->def = 0;
+ newgroup->deny_only = 1;
+ }
list_add_tail( &token->groups, &newgroup->entry );
if (src_token->primary_group == &group->sid)
{
@@ -674,11 +721,14 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
/* copy privileges */
LIST_FOR_EACH_ENTRY( privilege, &src_token->privileges, struct privilege, entry )
+ {
+ if (filter_privilege( privilege, filter_privileges, priv_count )) continue;
if (!privilege_add( token, &privilege->luid, privilege->enabled ))
{
release_object( token );
return NULL;
}
+ }
if (sd) default_set_sd( &token->obj, sd, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION );
@@ -1310,7 +1360,7 @@ DECL_HANDLER(duplicate_token)
TOKEN_DUPLICATE,
&token_ops )))
{
- struct token *token = token_duplicate( src_token, req->primary, req->impersonation_level, sd );
+ struct token *token = token_duplicate( src_token, req->primary, req->impersonation_level, sd, NULL, 0, NULL, 0 );
if (token)
{
reply->new_handle = alloc_handle_no_access_check( current->process, token, req->access, objattr->attributes );
@@ -1320,6 +1370,36 @@ DECL_HANDLER(duplicate_token)
}
}
+/* creates a restricted version of a token */
+DECL_HANDLER(filter_token)
+{
+ struct token *src_token;
+
+ if ((src_token = (struct token *)get_handle_obj( current->process, req->handle,
+ TOKEN_DUPLICATE,
+ &token_ops )))
+ {
+ const LUID_AND_ATTRIBUTES *filter_privileges = get_req_data();
+ unsigned int priv_count, group_count;
+ const SID *filter_groups;
+ struct token *token;
+
+ priv_count = min( req->privileges_size, get_req_data_size() ) / sizeof(LUID_AND_ATTRIBUTES);
+ filter_groups = (const SID *)((char *)filter_privileges + priv_count * sizeof(LUID_AND_ATTRIBUTES));
+ group_count = get_sid_count( filter_groups, get_req_data_size() - priv_count * sizeof(LUID_AND_ATTRIBUTES) );
+
+ token = token_duplicate( src_token, src_token->primary, src_token->impersonation_level, NULL,
+ filter_privileges, priv_count, filter_groups, group_count );
+ if (token)
+ {
+ unsigned int access = get_handle_access( current->process, req->handle );
+ reply->new_handle = alloc_handle_no_access_check( current->process, token, access, 0 );
+ release_object( token );
+ }
+ release_object( src_token );
+ }
+}
+
/* checks the specified privileges are held by the token */
DECL_HANDLER(check_token_privileges)
{
--
2.17.0
1
1
1
0
Binary packages for various distributions will be available from:
https://www.winehq.org/download
Summary since last release
* Rebased to current wine 4.6 (830 patches are applied to wine vanilla)
NOTE:
FAudio will not be supported until distro's have FAudio library as part
of their
standard repositories.
Upstreamed (Either directly from staging or fixed with a similar patch).
* shlwapi: SHMapHandle should not set error when NULL is passed as hShared.
* taskmgr: Use system font instead of special bitmap font.
* l3codeca.acm: Check input format in MPEG3_StreamOpen.
* server: Correctly validate SID length in sd_is_valid.
* dinput: Do not wait for hook thread startup in IDirectInput8::Initialize.
* d3dx9: Return D3DFMT_A8R8G8B8 in D3DXGetImageInfoFromFileInMemory for
32 bpp BMP with alpha.
* d3dx9_36: Return dummy skininfo interface in D3DXLoadSkinMeshFromXof
when skin information is unavailable.
* taskmgr: Use different units depending on memory usage.
* dinput: Avoid possible deadlock when CS are acquired in different order.
* hid: Implement HidD_FlushQueue.
* user32: Implement CWF_CREATE_ONLY flag for CreateWindowStation.
* wintrust: Verify image hash in WinVerifyTrust.
* ntoskrnl.exe: Implement ExInitializeResourceLite().
* ntoskrnl.exe: Implement ExAcquireResourceExclusiveLite().
* ntoskrnl.exe: Implement ExAcquireResourceSharedLite().
* ntoskrnl.exe: Implement ExAcquireSharedStarveExclusive().
* ntoskrnl.exe: Implement ExAcquireSharedWaitForExclusive().
* ntoskrnl.exe: Implement ExReleaseResourceForThreadLite().
* ntoskrnl.exe: Implement ExReleaseResourceLite().
* ntoskrnl.exe: Implement ExDeleteResourceLite().
* ntoskrnl.exe: Implement ExGetSharedWaiterCount().
* ntoskrnl.exe: Implement ExGetExclusiveWaiterCount().
* ntoskrnl.exe: Implement ExIsResourceAcquiredExclusiveLite().
* ntoskrnl.exe: Implement ExIsResourceAcquiredSharedLite().
* ntoskrnl.exe/tests: Add tests for ERESOURCE functions.
* winex11: Implement PK_CHANGE for wintab.
* kernel32: Correct ReplaceFileW behaviour.
Added:
* [33845] kernel32: Correct ReplaceFileW behaviour for warframe
* [36692] Many multi-threaded applications have poor performance due to
heavy use of synchronization primitives. (esync).
* [46948] Allow setting texture without DDSCAPS_TEXTURE for software device.
* [46870] League of Legends 8.12+ fails to start a game in Vista+ mode
(anticheat engine, SystemExtendedProcessInformation).
* [45666] League of Legends 8.15+ fails due to missing implementation of
NtQuerySystemInformation(SystemModuleInformationEx) in Windows Vista+ mode.
* [46989] dinput: Wheel, Gas, Brake axes inputs aren't recognized.
Updated:
* httpapi-HttpCreateServerSession
* ddraw-Write_Vtable
* wintab32-improvements
Where can you help
* Run Steam/Battle.net/UPlay.
* Try you favorite game.
* Test your favorite applications.
* Improve staging patches and get them accepted upstream.
As always, if you find a bug, please report it via
https://bugs.winehq.org
Best Regards
Alistair.
1
0
COPY
1
0
Fwd: TestBot job 50929 results: [PATCH] msxml3: put_output accepts DOMDocument destination
by Jefferson Carpenter 13 Apr '19
by Jefferson Carpenter 13 Apr '19
13 Apr '19
64-bit msxml3 tests also fail on my pc with a page fault in master.
-------- Forwarded Message --------
Subject: TestBot job 50929 results: [PATCH] msxml3: put_output accepts
DOMDocument destination
Date: Sat, 13 Apr 2019 17:36:17 -0500
From: Marvin <testbot(a)winehq.org>
To: jeffersoncarpenter2(a)gmail.com
VM Status Failures Command
debian9 success 0 debian9 failed 1
You can also see the results at:
https://testbot.winehq.org/JobDetails.pl?Key=50929
=== debian9 (64 bit WoW report) ===
msxml3:
Unhandled exception: page fault on execute access to 0x0003a8b0 in
64-bit code (0x000000000003a8b0).
Report errors:
msxml3:domdoc crashed (c0000005)
1
0
https://bugs.winehq.org/show_bug.cgi?id=45703
Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com>
---
dlls/ntdll/directory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index b46c2a6736..c99cf3c8a1 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -1933,7 +1933,7 @@ static NTSTATUS get_cached_dir_data( HANDLE handle, struct dir_data **data_ret,
* NtQueryDirectoryFile [NTDLL.@]
* ZwQueryDirectoryFile [NTDLL.@]
*/
-NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event,
+NTSTATUS WINAPI DECLSPEC_HOTPATCH NtQueryDirectoryFile( HANDLE handle, HANDLE event,
PIO_APC_ROUTINE apc_routine, PVOID apc_context,
PIO_STATUS_BLOCK io,
PVOID buffer, ULONG length,
--
2.20.1
1
0