winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
December 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1233 discussions
Start a n
N
ew thread
Piotr Caban : mshtml: Added IDispatch ConnectionPoint.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: d383e84e216822e5a299ee515613abdad69c6600 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d383e84e216822e5a299ee515…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Dec 28 20:09:16 2009 +0100 mshtml: Added IDispatch ConnectionPoint. --- dlls/mshtml/htmldoc.c | 1 + dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/htmldoc.c | 1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 1e97d46..732fd52 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -1795,6 +1795,7 @@ static void init_doc(HTMLDocument *doc, IUnknown *unk_impl, IDispatchEx *dispex) HTMLDocument_Hlink_Init(doc); ConnectionPointContainer_Init(&doc->cp_container, (IUnknown*)HTMLDOC(doc)); + ConnectionPoint_Init(&doc->cp_dispatch, &doc->cp_container, &IID_IDispatch, NULL); ConnectionPoint_Init(&doc->cp_propnotif, &doc->cp_container, &IID_IPropertyNotifySink, NULL); ConnectionPoint_Init(&doc->cp_htmldocevents, &doc->cp_container, &DIID_HTMLDocumentEvents, &HTMLDocumentEvents_data); ConnectionPoint_Init(&doc->cp_htmldocevents2, &doc->cp_container, &DIID_HTMLDocumentEvents2, NULL); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 2ef7611..fcdb916 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -340,6 +340,7 @@ struct HTMLDocument { ConnectionPoint cp_htmldocevents; ConnectionPoint cp_htmldocevents2; ConnectionPoint cp_propnotif; + ConnectionPoint cp_dispatch; IOleAdviseHolder *advise_holder; }; diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index d74bf96..1666020 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -2953,6 +2953,7 @@ static void test_ConnectionPointContainer(IUnknown *unk) if(FAILED(hres)) return; + test_ConnectionPoint(container, &IID_IDispatch); test_ConnectionPoint(container, &IID_IPropertyNotifySink); test_ConnectionPoint(container, &DIID_HTMLDocumentEvents); test_ConnectionPoint(container, &DIID_HTMLDocumentEvents2);
1
0
0
0
Piotr Caban : mshtml: Query OleClientSite about services in ServiceProvider_QueryService.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: be2a86cbd50eab8585571a2e3a46541b9df407b6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=be2a86cbd50eab8585571a2e3…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Dec 28 20:08:46 2009 +0100 mshtml: Query OleClientSite about services in ServiceProvider_QueryService. --- dlls/mshtml/service.c | 17 ++++++++++++++++- dlls/mshtml/tests/htmldoc.c | 20 ++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/service.c b/dlls/mshtml/service.c index d120cf4..c77afe4 100644 --- a/dlls/mshtml/service.c +++ b/dlls/mshtml/service.c @@ -248,9 +248,24 @@ static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFG return S_OK; } + if(This->doc_obj->client) { + IServiceProvider *sp; + HRESULT hres; + + hres = IOleClientSite_QueryInterface(This->doc_obj->client, + &IID_IServiceProvider, (void**)&sp); + if(SUCCEEDED(hres)) { + hres = IServiceProvider_QueryService(sp, guidService, riid, ppv); + IServiceProvider_Release(sp); + + if(SUCCEEDED(hres)) + return hres; + } + } + FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv); - return E_UNEXPECTED; + return E_NOINTERFACE; } static const IServiceProviderVtbl ServiceProviderVtbl = { diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 8a36bc1..d74bf96 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -4508,6 +4508,24 @@ static void test_HTMLDocument_http(void) ok(!ref, "ref=%d, expected 0\n", ref); } +static void test_QueryService(IUnknown *unk, BOOL success) +{ + IServiceProvider *sp; + IHlinkFrame *hf; + HRESULT hres; + + hres = IUnknown_QueryInterface(unk, &IID_IServiceProvider, (void**)&sp); + ok(hres == S_OK, "QueryService returned %08x\n", hres); + + hres = IServiceProvider_QueryService(sp, &IID_IHlinkFrame, &IID_IHlinkFrame, (void**)&hf); + if(SUCCEEDED(hres)) + IHlinkFrame_Release(hf); + + ok(hres == (success?S_OK:E_NOINTERFACE), "QueryService returned %08x, expected %08x\n", hres, success?S_OK:E_NOINTERFACE); + + IServiceProvider_Release(sp); +} + static void test_HTMLDocument_StreamLoad(void) { IOleObject *oleobj; @@ -4535,7 +4553,9 @@ static void test_HTMLDocument_StreamLoad(void) test_readyState(unk); test_IsDirty(unk, S_FALSE); test_ConnectionPointContainer(unk); + test_QueryService(unk, FALSE); test_ClientSite(oleobj, CLIENTSITE_EXPECTPATH); + test_QueryService(unk, TRUE); test_DoVerb(oleobj); test_MSHTML_QueryStatus(unk, OLECMDF_SUPPORTED);
1
0
0
0
Henri Verbeet : dxgi: Add a separate function for swapchain initialization.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: 044a989d79e1b590f0167ff1170a072ff12ffa9c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=044a989d79e1b590f0167ff11…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Dec 28 17:38:05 2009 +0100 dxgi: Add a separate function for swapchain initialization. --- dlls/dxgi/device.c | 14 ++++++-------- dlls/dxgi/dxgi_private.h | 4 +++- dlls/dxgi/swapchain.c | 21 ++++++++++++++++++++- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c index eddb1e4..616be6a 100644 --- a/dlls/dxgi/device.c +++ b/dlls/dxgi/device.c @@ -291,10 +291,12 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *ifa static HRESULT STDMETHODCALLTYPE dxgi_device_create_swapchain(IWineDXGIDevice *iface, WINED3DPRESENT_PARAMETERS *present_parameters, IWineD3DSwapChain **wined3d_swapchain) { - struct dxgi_device *This = (struct dxgi_device *)iface; struct dxgi_swapchain *object; HRESULT hr; + TRACE("iface %p, present_parameters %p, wined3d_swapchain %p.\n", + iface, present_parameters, wined3d_swapchain); + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) { @@ -302,20 +304,16 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_swapchain(IWineDXGIDevice *i return E_OUTOFMEMORY; } - object->vtbl = &dxgi_swapchain_vtbl; - object->refcount = 1; - - hr = IWineD3DDevice_CreateSwapChain(This->wined3d_device, present_parameters, - &object->wined3d_swapchain, (IUnknown *)object, SURFACE_OPENGL); + hr = dxgi_swapchain_init(object, (struct dxgi_device *)iface, present_parameters); if (FAILED(hr)) { - WARN("Failed to create a swapchain, returning %#x\n", hr); + WARN("Failed to initialize swapchain, hr %#x.\n", hr); HeapFree(GetProcessHeap(), 0, object); return hr; } - *wined3d_swapchain = object->wined3d_swapchain; TRACE("Created IDXGISwapChain %p\n", object); + *wined3d_swapchain = object->wined3d_swapchain; return S_OK; } diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h index 6151800..693bc39 100644 --- a/dlls/dxgi/dxgi_private.h +++ b/dlls/dxgi/dxgi_private.h @@ -121,7 +121,6 @@ struct dxgi_adapter HRESULT dxgi_adapter_init(struct dxgi_adapter *adapter, IWineDXGIFactory *parent, UINT ordinal) DECLSPEC_HIDDEN; /* IDXGISwapChain */ -extern const struct IDXGISwapChainVtbl dxgi_swapchain_vtbl DECLSPEC_HIDDEN; struct dxgi_swapchain { const struct IDXGISwapChainVtbl *vtbl; @@ -129,6 +128,9 @@ struct dxgi_swapchain IWineD3DSwapChain *wined3d_swapchain; }; +HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device *device, + WINED3DPRESENT_PARAMETERS *present_parameters) DECLSPEC_HIDDEN; + /* IDXGISurface */ struct dxgi_surface { diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index a76cb12..891c4ec 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -249,7 +249,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetLastPresentCount(IDXGISwapCha return E_NOTIMPL; } -const struct IDXGISwapChainVtbl dxgi_swapchain_vtbl = +static const struct IDXGISwapChainVtbl dxgi_swapchain_vtbl = { /* IUnknown methods */ dxgi_swapchain_QueryInterface, @@ -274,3 +274,22 @@ const struct IDXGISwapChainVtbl dxgi_swapchain_vtbl = dxgi_swapchain_GetFrameStatistics, dxgi_swapchain_GetLastPresentCount, }; + +HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device *device, + WINED3DPRESENT_PARAMETERS *present_parameters) +{ + HRESULT hr; + + swapchain->vtbl = &dxgi_swapchain_vtbl; + swapchain->refcount = 1; + + hr = IWineD3DDevice_CreateSwapChain(device->wined3d_device, present_parameters, + &swapchain->wined3d_swapchain, (IUnknown *)swapchain, SURFACE_OPENGL); + if (FAILED(hr)) + { + WARN("Failed to create wined3d swapchain, hr %#x.\n", hr); + return hr; + } + + return S_OK; +}
1
0
0
0
Henri Verbeet : wined3d: Clear the device' s focus_window field when the window is destroyed.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: d588d2b489e5cf3ac65cfc8f3d36917d14f61d95 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d588d2b489e5cf3ac65cfc8f3…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Dec 28 17:38:04 2009 +0100 wined3d: Clear the device's focus_window field when the window is destroyed. This will prevent the device from trying to unregister the window again on release. --- dlls/wined3d/device.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e4355df..8240f55 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -7069,6 +7069,9 @@ LRESULT device_process_message(IWineD3DDeviceImpl *device, HWND window, { TRACE("unregister window %p.\n", window); wined3d_unregister_window(window); + + if (device->focus_window == window) device->focus_window = NULL; + else ERR("Window %p is not the focus window for device %p.\n", window, device); } return CallWindowProcW(proc, window, message, wparam, lparam);
1
0
0
0
Henri Verbeet : d3d9/tests: Add message tests for windowed devices.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: d992e77b9cf3511d253d64852ba3fdf14de65529 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d992e77b9cf3511d253d64852…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Dec 28 17:38:03 2009 +0100 d3d9/tests: Add message tests for windowed devices. --- dlls/d3d9/tests/device.c | 103 +++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 98 insertions(+), 5 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 9429e7a..1e58008 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -32,12 +32,12 @@ static int get_refcount(IUnknown *object) return IUnknown_Release( object ); } -static IDirect3DDevice9 *create_device(IDirect3D9 *d3d9, HWND device_window, HWND focus_window) +static IDirect3DDevice9 *create_device(IDirect3D9 *d3d9, HWND device_window, HWND focus_window, BOOL windowed) { D3DPRESENT_PARAMETERS present_parameters = {0}; IDirect3DDevice9 *device; - present_parameters.Windowed = FALSE; + present_parameters.Windowed = windowed; present_parameters.hDeviceWindow = device_window; present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD; present_parameters.BackBufferWidth = 640; @@ -2467,7 +2467,7 @@ static void test_wndproc(void) expect_message.window = focus_window; expect_message.message = WM_SETFOCUS; - device = create_device(d3d9, device_window, focus_window); + device = create_device(d3d9, device_window, focus_window, FALSE); if (!device) { skip("Failed to create a D3D device, skipping tests.\n"); @@ -2496,7 +2496,7 @@ static void test_wndproc(void) ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", (LONG_PTR)test_proc, proc); - device = create_device(d3d9, focus_window, focus_window); + device = create_device(d3d9, focus_window, focus_window, FALSE); if (!device) { skip("Failed to create a D3D device, skipping tests.\n"); @@ -2506,7 +2506,7 @@ static void test_wndproc(void) ref = IDirect3DDevice9_Release(device); ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); - device = create_device(d3d9, device_window, focus_window); + device = create_device(d3d9, device_window, focus_window, FALSE); if (!device) { skip("Failed to create a D3D device, skipping tests.\n"); @@ -2533,6 +2533,98 @@ done: UnregisterClassA("d3d9_test_wndproc_wc", GetModuleHandleA(NULL)); } +static void test_wndproc_windowed(void) +{ + HWND device_window, focus_window, dummy_window, tmp; + IDirect3DDevice9 *device; + WNDCLASSA wc = {0}; + IDirect3D9 *d3d9; + LONG_PTR proc; + ULONG ref; + + if (!(d3d9 = pDirect3DCreate9(D3D_SDK_VERSION))) + { + skip("Failed to create IDirect3D9 object, skipping tests.\n"); + return; + } + + wc.lpfnWndProc = test_proc; + wc.lpszClassName = "d3d9_test_wndproc_wc"; + ok(RegisterClassA(&wc), "Failed to register window class.\n"); + + focus_window = CreateWindowA("d3d9_test_wndproc_wc", "d3d9_test", + WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); + device_window = CreateWindowA("d3d9_test_wndproc_wc", "d3d9_test", + WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); + dummy_window = CreateWindowA("d3d9_test_wndproc_wc", "d3d9_test", + WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); + + proc = GetWindowLongPtrA(device_window, GWLP_WNDPROC); + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + (LONG_PTR)test_proc, proc); + proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + (LONG_PTR)test_proc, proc); + + trace("device_window %p, focus_window %p, dummy_window %p.\n", device_window, focus_window, dummy_window); + + tmp = GetFocus(); + ok(tmp == dummy_window, "Expected focus %p, got %p.\n", dummy_window, tmp); + + filter_messages = focus_window; + + device = create_device(d3d9, device_window, focus_window, TRUE); + if (!device) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + tmp = GetFocus(); + ok(tmp == dummy_window, "Expected focus %p, got %p.\n", dummy_window, tmp); + + proc = GetWindowLongPtrA(device_window, GWLP_WNDPROC); + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + (LONG_PTR)test_proc, proc); + + proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + (LONG_PTR)test_proc, proc); + + ref = IDirect3DDevice9_Release(device); + ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); + + filter_messages = device_window; + + device = create_device(d3d9, focus_window, focus_window, TRUE); + if (!device) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + ref = IDirect3DDevice9_Release(device); + ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); + + device = create_device(d3d9, device_window, focus_window, TRUE); + if (!device) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + ref = IDirect3DDevice9_Release(device); + ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); + +done: + filter_messages = NULL; + IDirect3D9_Release(d3d9); + DestroyWindow(dummy_window); + DestroyWindow(device_window); + DestroyWindow(focus_window); + UnregisterClassA("d3d9_test_wndproc_wc", GetModuleHandleA(NULL)); +} + START_TEST(device) { HMODULE d3d9_handle = LoadLibraryA( "d3d9.dll" ); @@ -2573,5 +2665,6 @@ START_TEST(device) test_set_stream_source(); test_scissor_size(); test_wndproc(); + test_wndproc_windowed(); } }
1
0
0
0
Henri Verbeet : d3d8/tests: Add message tests for windowed devices.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: d18bbbf09dd7c7e29eae51fdb7057e641d942512 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d18bbbf09dd7c7e29eae51fdb…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Dec 28 17:38:02 2009 +0100 d3d8/tests: Add message tests for windowed devices. --- dlls/d3d8/tests/device.c | 103 +++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 98 insertions(+), 5 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index ebfc030..404c564 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -46,12 +46,12 @@ static int get_refcount(IUnknown *object) return IUnknown_Release( object ); } -static IDirect3DDevice8 *create_device(IDirect3D8 *d3d8, HWND device_window, HWND focus_window) +static IDirect3DDevice8 *create_device(IDirect3D8 *d3d8, HWND device_window, HWND focus_window, BOOL windowed) { D3DPRESENT_PARAMETERS present_parameters = {0}; IDirect3DDevice8 *device; - present_parameters.Windowed = FALSE; + present_parameters.Windowed = windowed; present_parameters.hDeviceWindow = device_window; present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD; present_parameters.BackBufferWidth = 640; @@ -1547,7 +1547,7 @@ static void test_wndproc(void) expect_message.window = focus_window; expect_message.message = WM_SETFOCUS; - device = create_device(d3d8, device_window, focus_window); + device = create_device(d3d8, device_window, focus_window, FALSE); if (!device) { skip("Failed to create a D3D device, skipping tests.\n"); @@ -1576,7 +1576,7 @@ static void test_wndproc(void) ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", (LONG_PTR)test_proc, proc); - device = create_device(d3d8, focus_window, focus_window); + device = create_device(d3d8, focus_window, focus_window, FALSE); if (!device) { skip("Failed to create a D3D device, skipping tests.\n"); @@ -1586,7 +1586,7 @@ static void test_wndproc(void) ref = IDirect3DDevice8_Release(device); ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); - device = create_device(d3d8, device_window, focus_window); + device = create_device(d3d8, device_window, focus_window, FALSE); if (!device) { skip("Failed to create a D3D device, skipping tests.\n"); @@ -1613,6 +1613,98 @@ done: UnregisterClassA("d3d8_test_wndproc_wc", GetModuleHandleA(NULL)); } +static void test_wndproc_windowed(void) +{ + HWND device_window, focus_window, dummy_window, tmp; + IDirect3DDevice8 *device; + WNDCLASSA wc = {0}; + IDirect3D8 *d3d8; + LONG_PTR proc; + ULONG ref; + + if (!(d3d8 = pDirect3DCreate8(D3D_SDK_VERSION))) + { + skip("Failed to create IDirect3D8 object, skipping tests.\n"); + return; + } + + wc.lpfnWndProc = test_proc; + wc.lpszClassName = "d3d8_test_wndproc_wc"; + ok(RegisterClassA(&wc), "Failed to register window class.\n"); + + focus_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test", + WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); + device_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test", + WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); + dummy_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test", + WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); + + proc = GetWindowLongPtrA(device_window, GWLP_WNDPROC); + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + (LONG_PTR)test_proc, proc); + proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + (LONG_PTR)test_proc, proc); + + trace("device_window %p, focus_window %p, dummy_window %p.\n", device_window, focus_window, dummy_window); + + tmp = GetFocus(); + ok(tmp == dummy_window, "Expected focus %p, got %p.\n", dummy_window, tmp); + + filter_messages = focus_window; + + device = create_device(d3d8, device_window, focus_window, TRUE); + if (!device) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + tmp = GetFocus(); + ok(tmp == dummy_window, "Expected focus %p, got %p.\n", dummy_window, tmp); + + proc = GetWindowLongPtrA(device_window, GWLP_WNDPROC); + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + (LONG_PTR)test_proc, proc); + + proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); + ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", + (LONG_PTR)test_proc, proc); + + ref = IDirect3DDevice8_Release(device); + ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); + + filter_messages = device_window; + + device = create_device(d3d8, focus_window, focus_window, TRUE); + if (!device) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + ref = IDirect3DDevice8_Release(device); + ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); + + device = create_device(d3d8, device_window, focus_window, TRUE); + if (!device) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + ref = IDirect3DDevice8_Release(device); + ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); + +done: + filter_messages = NULL; + IDirect3D8_Release(d3d8); + DestroyWindow(dummy_window); + DestroyWindow(device_window); + DestroyWindow(focus_window); + UnregisterClassA("d3d8_test_wndproc_wc", GetModuleHandleA(NULL)); +} + START_TEST(device) { HMODULE d3d8_handle = LoadLibraryA( "d3d8.dll" ); @@ -1649,5 +1741,6 @@ START_TEST(device) test_render_zero_triangles(); test_depth_stencil_reset(); test_wndproc(); + test_wndproc_windowed(); } }
1
0
0
0
Henri Verbeet : wined3d: Don't touch the window' s focus or wndproc for windowed devices.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: 990c1410524c0cf47cd306eab08d1994398fa15d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=990c1410524c0cf47cd306eab…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Dec 28 17:38:01 2009 +0100 wined3d: Don't touch the window's focus or wndproc for windowed devices. --- dlls/wined3d/device.c | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index edc2409..e4355df 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1383,12 +1383,15 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, if(This->d3d_initialized) return WINED3DERR_INVALIDCALL; if(!This->adapter->opengl) return WINED3DERR_INVALIDCALL; - This-> focus_window = This->createParms.hFocusWindow; - if (!This->focus_window) This->focus_window = pPresentationParameters->hDeviceWindow; - if (!wined3d_register_window(This->focus_window, This)) + if (!pPresentationParameters->Windowed) { - ERR("Failed to register window %p.\n", This->focus_window); - return E_FAIL; + This->focus_window = This->createParms.hFocusWindow; + if (!This->focus_window) This->focus_window = pPresentationParameters->hDeviceWindow; + if (!wined3d_register_window(This->focus_window, This)) + { + ERR("Failed to register window %p.\n", This->focus_window); + return E_FAIL; + } } TRACE("(%p) : Creating stateblock\n", This); @@ -1444,7 +1447,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, } } - SetFocus(This->focus_window); + if (This->focus_window) SetFocus(This->focus_window); /* Setup the implicit swapchain. This also initializes a context. */ TRACE("Creating implicit swapchain\n"); @@ -1580,7 +1583,7 @@ err_out: if (This->shader_priv) { This->shader_backend->shader_free_private(iface); } - wined3d_unregister_window(This->focus_window); + if (This->focus_window) wined3d_unregister_window(This->focus_window); return hr; } @@ -1771,7 +1774,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, This->d3d_initialized = FALSE; - wined3d_unregister_window(This->focus_window); + if (This->focus_window) wined3d_unregister_window(This->focus_window); return WINED3D_OK; }
1
0
0
0
Aaron Brazener : wined3d: Added ATI Radeon HD 5xxx detection.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: 381fa8931f95ad1dc7169459500e9331f66c2597 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=381fa8931f95ad1dc71694595…
Author: Aaron Brazener <rnbrznr(a)gmail.com> Date: Mon Dec 28 12:00:48 2009 +0000 wined3d: Added ATI Radeon HD 5xxx detection. --- dlls/wined3d/directx.c | 20 ++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 6 ++++++ 2 files changed, 26 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 3ab1902..713a349 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -966,6 +966,8 @@ static const struct driver_version_information driver_version_table[] = {VENDOR_ATI, CARD_ATI_RADEON_HD4600, "ATI Radeon HD 4600 Series", 14, 10, 6764 }, {VENDOR_ATI, CARD_ATI_RADEON_HD4700, "ATI Radeon HD 4700 Series", 14, 10, 6764 }, {VENDOR_ATI, CARD_ATI_RADEON_HD4800, "ATI Radeon HD 4800 Series", 14, 10, 6764 }, + {VENDOR_ATI, CARD_ATI_RADEON_HD5700, "ATI Radeon HD 5700 Series", 14, 10, 8681 }, + {VENDOR_ATI, CARD_ATI_RADEON_HD5800, "ATI Radeon HD 5800 Series", 14, 10, 8681 }, /* TODO: Add information about legacy ATI hardware, Intel and other cards. */ }; @@ -1431,6 +1433,24 @@ static enum wined3d_pci_device wined3d_guess_card(const struct wined3d_gl_info * * eg HD 4800 is returned for multiple cards, even for RV790 based ones. */ if (WINE_D3D9_CAPABLE(gl_info)) { + /* Radeon EG CYPRESS XT / PRO HD5800 - highend */ + if (strstr(gl_renderer, "HD 5800") /* Radeon EG CYPRESS HD58xx generic renderer string */ + || strstr(gl_renderer, "HD 5850") /* Radeon EG CYPRESS XT */ + || strstr(gl_renderer, "HD 5870")) /* Radeon EG CYPRESS PRO */ + { + *vidmem = 1024; /* note: HD58xx cards use 1024MB */ + return CARD_ATI_RADEON_HD5800; + } + + /* Radeon EG JUNIPER XT / LE HD5700 - midend */ + if (strstr(gl_renderer, "HD 5700") /* Radeon EG JUNIPER HD57xx generic renderer string */ + || strstr(gl_renderer, "HD 5750") /* Radeon EG JUNIPER LE */ + || strstr(gl_renderer, "HD 5770")) /* Radeon EG JUNIPER XT */ + { + *vidmem = 512; /* note: HD5770 cards use 1024MB and HD5750 cards use 512MB or 1024MB */ + return CARD_ATI_RADEON_HD5700; + } + /* Radeon R7xx HD4800 - highend */ if (strstr(gl_renderer, "HD 4800") /* Radeon RV7xx HD48xx generic renderer string */ || strstr(gl_renderer, "HD 4830") /* Radeon RV770 */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 76d4aa5..b0c2804 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1271,6 +1271,12 @@ enum wined3d_pci_device CARD_ATI_RADEON_HD4850 = 0x9442, CARD_ATI_RADEON_HD4870 = 0x9440, CARD_ATI_RADEON_HD4890 = 0x9460, + CARD_ATI_RADEON_HD5700 = 0x68BE, /* Picked HD5750 */ + CARD_ATI_RADEON_HD5750 = 0x68BE, + CARD_ATI_RADEON_HD5770 = 0x68B8, + CARD_ATI_RADEON_HD5800 = 0x6898, /* Picked HD5850 */ + CARD_ATI_RADEON_HD5850 = 0x6898, + CARD_ATI_RADEON_HD5870 = 0x6899, CARD_NVIDIA_RIVA_128 = 0x0018, CARD_NVIDIA_RIVA_TNT = 0x0020,
1
0
0
0
Stefan Dösinger : wined3d: Drop the VBO if too many full buffer conversions occur.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: 4f594777a28c935d2eac23169012144fba974e40 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f594777a28c935d2eac23169…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Dec 24 16:35:07 2009 +0100 wined3d: Drop the VBO if too many full buffer conversions occur. --- dlls/wined3d/buffer.c | 37 +++++++++++++++++++++++++++++-------- dlls/wined3d/wined3d_private.h | 2 +- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index f9242e4..36e9acc 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -31,8 +31,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); #define GLINFO_LOCATION This->resource.device->adapter->gl_info -#define VB_MAXDECLCHANGES 100 /* After that number we stop converting */ -#define VB_RESETDECLCHANGE 1000 /* Reset the changecount after that number of draws */ +#define VB_MAXDECLCHANGES 100 /* After that number of decl changes we stop converting */ +#define VB_RESETDECLCHANGE 1000 /* Reset the decl changecount after that number of draws */ +#define VB_MAXFULLCONVERSIONS 5 /* Number of full conversions before we stop converting */ +#define VB_RESETFULLCONVS 20 /* Reset full conversion counts after that number of draws */ /* Context activation is done by the caller. */ static void buffer_create_buffer_object(struct wined3d_buffer *This) @@ -711,8 +713,8 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) } else { - context_release(context); - return; /* Not doing any conversion */ + /* Not doing any conversion */ + goto end; } } @@ -728,6 +730,7 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) context_release(context); ++This->draw_count; if (This->draw_count > VB_RESETDECLCHANGE) This->decl_change_count = 0; + if (This->draw_count > VB_RESETFULLCONVS) This->full_conversion_count = 0; return; } @@ -753,8 +756,7 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) * rarely */ IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC); - context_release(context); - return; + goto end; } buffer_check_buffer_object_size(This); } @@ -764,8 +766,24 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) * changes it every minute drop the VBO after VB_MAX_DECL_CHANGES minutes. So count draws without * decl changes and reset the decl change count after a specific number of them */ - ++This->draw_count; - if (This->draw_count > VB_RESETDECLCHANGE) This->decl_change_count = 0; + if(This->dirty_start == 0 && This->dirty_end == This->resource.size) + { + ++This->full_conversion_count; + if(This->full_conversion_count > VB_MAXFULLCONVERSIONS) + { + FIXME("Too many full buffer conversions, stopping converting\n"); + IWineD3DBuffer_UnLoad(iface); + This->flags &= ~WINED3D_BUFFER_CREATEBO; + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC); + goto end; + } + } + else + { + ++This->draw_count; + if (This->draw_count > VB_RESETDECLCHANGE) This->decl_change_count = 0; + if (This->draw_count > VB_RESETFULLCONVS) This->full_conversion_count = 0; + } } if (decl_changed) @@ -915,7 +933,10 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) } HeapFree(GetProcessHeap(), 0, data); + +end: context_release(context); + return; } static WINED3DRESOURCETYPE STDMETHODCALLTYPE buffer_GetType(IWineD3DBuffer *iface) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 386aea5..76d4aa5 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2373,7 +2373,7 @@ struct wined3d_buffer LONG lock_count; /* conversion stuff */ - UINT decl_change_count; + UINT decl_change_count, full_conversion_count; UINT draw_count; UINT stride; /* 0 if no conversion */ UINT conversion_stride; /* 0 if no shifted conversion */
1
0
0
0
Stefan Dösinger : wined3d: Increment the buffer draw count if the buffer was clean.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: 9750cca9b13f20c03e1ecf7c5b383023ad0f7f93 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9750cca9b13f20c03e1ecf7c5…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Dec 23 15:41:53 2009 +0100 wined3d: Increment the buffer draw count if the buffer was clean. --- dlls/wined3d/buffer.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 20b40cb..f9242e4 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -726,6 +726,8 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) if (!decl_changed && !(This->flags & WINED3D_BUFFER_HASDESC && This->flags & WINED3D_BUFFER_DIRTY)) { context_release(context); + ++This->draw_count; + if (This->draw_count > VB_RESETDECLCHANGE) This->decl_change_count = 0; return; }
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
124
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Results per page:
10
25
50
100
200