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 2006
----- 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
4 participants
720 discussions
Start a n
N
ew thread
Markus Amsler : d3d8: Handle volume refcount forwarding in d3d8.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 0a3f417359e17ddd6fe1b0823dba47c2c52a0698 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0a3f417359e17ddd6fe1b0823…
Author: Markus Amsler <markus.amsler(a)oribi.org> Date: Tue Dec 5 00:29:42 2006 +0100 d3d8: Handle volume refcount forwarding in d3d8. --- dlls/d3d8/d3d8_private.h | 5 +++++ dlls/d3d8/volume.c | 27 +++++++++++++++++---------- dlls/d3d8/volumetexture.c | 2 +- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index de553c6..a6ae848 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -196,6 +196,9 @@ struct IDirect3DVolume8Impl /* IDirect3DVolume8 fields */ IWineD3DVolume *wineD3DVolume; + + /* If set forward refcounting to this object */ + IUnknown *forwardReference; }; /* ------------------- */ @@ -598,4 +601,6 @@ extern ULONG WINAPI D3D8CB_DestroyDepthS extern ULONG WINAPI D3D8CB_DestroySurface(IWineD3DSurface *pSurface); +extern ULONG WINAPI D3D8CB_DestroyVolume(IWineD3DVolume *pVolume); + #endif /* __WINE_D3DX8_PRIVATE_H */ diff --git a/dlls/d3d8/volume.c b/dlls/d3d8/volume.c index 53dba41..0eba97a 100644 --- a/dlls/d3d8/volume.c +++ b/dlls/d3d8/volume.c @@ -41,15 +41,13 @@ static HRESULT WINAPI IDirect3DVolume8Im static ULONG WINAPI IDirect3DVolume8Impl_AddRef(LPDIRECT3DVOLUME8 iface) { IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; - IUnknown *containerParent = NULL; TRACE("(%p)\n", This); - IWineD3DVolume_GetContainerParent(This->wineD3DVolume, &containerParent); - if (containerParent) { + if (This->forwardReference) { /* Forward to the containerParent */ - TRACE("(%p) : Forwarding to %p\n", This, containerParent); - return IUnknown_AddRef(containerParent); + TRACE("(%p) : Forwarding to %p\n", This, This->forwardReference); + return IUnknown_AddRef(This->forwardReference); } else { /* No container, handle our own refcounting */ ULONG ref = InterlockedIncrement(&This->ref); @@ -60,15 +58,13 @@ static ULONG WINAPI IDirect3DVolume8Impl static ULONG WINAPI IDirect3DVolume8Impl_Release(LPDIRECT3DVOLUME8 iface) { IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; - IUnknown *containerParent = NULL; TRACE("(%p)\n", This); - IWineD3DVolume_GetContainerParent(This->wineD3DVolume, &containerParent); - if (containerParent) { + if (This->forwardReference) { /* Forward to the containerParent */ - TRACE("(%p) : Forwarding to %p\n", This, containerParent); - return IUnknown_Release(containerParent); + TRACE("(%p) : Forwarding to %p\n", This, This->forwardReference); + return IUnknown_Release(This->forwardReference); } else { /* No container, handle our own refcounting */ @@ -227,7 +223,18 @@ HRESULT WINAPI D3D8CB_CreateVolume(IUnkn *ppVolume = NULL; } else { *ppVolume = (IWineD3DVolume *)object->wineD3DVolume; + object->forwardReference = pSuperior; } TRACE("(%p) Created volume %p\n", This, *ppVolume); return hrc; } + +ULONG WINAPI D3D8CB_DestroyVolume(IWineD3DVolume *pVolume) { + IDirect3DVolume8Impl* volumeParent; + + IWineD3DVolume_GetParent(pVolume, (IUnknown **) &volumeParent); + /* GetParent's AddRef was forwarded to an object in destruction. + * Releasing it here again would cause an endless recursion. */ + volumeParent->forwardReference = NULL; + return IDirect3DVolume8_Release((IDirect3DVolume8*) volumeParent); +} diff --git a/dlls/d3d8/volumetexture.c b/dlls/d3d8/volumetexture.c index cf0202c..430f0b4 100644 --- a/dlls/d3d8/volumetexture.c +++ b/dlls/d3d8/volumetexture.c @@ -57,7 +57,7 @@ static ULONG WINAPI IDirect3DVolumeTextu TRACE("(%p) : ReleaseRef to %d\n", This, ref); if (ref == 0) { - IWineD3DVolumeTexture_Release(This->wineD3DVolumeTexture); + IWineD3DVolumeTexture_Destroy(This->wineD3DVolumeTexture, D3D8CB_DestroyVolume); IUnknown_Release(This->parentDevice); HeapFree(GetProcessHeap(), 0, This); }
1
0
0
0
Markus Amsler : d3d8: Handle surface refcount forwarding in d3d8.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 0d725490d643b8c654afbbeeedbfe754e6dcda3a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d725490d643b8c654afbbeee…
Author: Markus Amsler <markus.amsler(a)oribi.org> Date: Tue Dec 5 00:29:37 2006 +0100 d3d8: Handle surface refcount forwarding in d3d8. --- dlls/d3d8/cubetexture.c | 2 +- dlls/d3d8/d3d8_private.h | 5 +++++ dlls/d3d8/device.c | 12 ++++++++++++ dlls/d3d8/surface.c | 20 ++++++++------------ dlls/d3d8/tests/device.c | 2 +- dlls/d3d8/texture.c | 2 +- 6 files changed, 28 insertions(+), 15 deletions(-) diff --git a/dlls/d3d8/cubetexture.c b/dlls/d3d8/cubetexture.c index dffc08e..49006b5 100644 --- a/dlls/d3d8/cubetexture.c +++ b/dlls/d3d8/cubetexture.c @@ -57,7 +57,7 @@ static ULONG WINAPI IDirect3DCubeTexture if (ref == 0) { TRACE("Releasing child %p\n", This->wineD3DCubeTexture); - IWineD3DCubeTexture_Release(This->wineD3DCubeTexture); + IWineD3DCubeTexture_Destroy(This->wineD3DCubeTexture, D3D8CB_DestroySurface); IUnknown_Release(This->parentDevice); HeapFree(GetProcessHeap(), 0, This); } diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index 4e8b96b..de553c6 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -246,6 +246,9 @@ struct IDirect3DSurface8Impl /* Parent reference */ LPDIRECT3DDEVICE8 parentDevice; + + /* If set forward refcounting to this object */ + IUnknown *forwardReference; }; /* ------------------ */ @@ -593,4 +596,6 @@ extern HRESULT WINAPI D3D8CB_CreateRende extern ULONG WINAPI D3D8CB_DestroyDepthStencilSurface (IWineD3DSurface *pSurface); +extern ULONG WINAPI D3D8CB_DestroySurface(IWineD3DSurface *pSurface); + #endif /* __WINE_D3DX8_PRIVATE_H */ diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 565f4af..68a1a5f 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1622,8 +1622,20 @@ HRESULT WINAPI D3D8CB_CreateSurface(IUnk *ppSurface = d3dSurface->wineD3DSurface; IUnknown_Release(d3dSurface->parentDevice); d3dSurface->parentDevice = NULL; + d3dSurface->forwardReference = pSuperior; } else { FIXME("(%p) IDirect3DDevice8_CreateSurface failed\n", device); } return res; } + +ULONG WINAPI D3D8CB_DestroySurface(IWineD3DSurface *pSurface) { + IDirect3DSurface8Impl* surfaceParent; + TRACE("(%p) call back\n", pSurface); + + IWineD3DSurface_GetParent(pSurface, (IUnknown **) &surfaceParent); + /* GetParent's AddRef was forwarded to an object in destruction. + * Releasing it here again would cause an endless recursion. */ + surfaceParent->forwardReference = NULL; + return IDirect3DSurface8_Release((IDirect3DSurface8*) surfaceParent); +} diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c index 8ab312e..61db485 100644 --- a/dlls/d3d8/surface.c +++ b/dlls/d3d8/surface.c @@ -42,15 +42,13 @@ static HRESULT WINAPI IDirect3DSurface8I static ULONG WINAPI IDirect3DSurface8Impl_AddRef(LPDIRECT3DSURFACE8 iface) { IDirect3DSurface8Impl *This = (IDirect3DSurface8Impl *)iface; - IUnknown *containerParent = NULL; TRACE("(%p)\n", This); - IWineD3DSurface_GetContainerParent(This->wineD3DSurface, &containerParent); - if (containerParent) { - /* Forward to the containerParent */ - TRACE("(%p) : Forwarding to %p\n", This, containerParent); - return IUnknown_AddRef(containerParent); + if (This->forwardReference) { + /* Forward refcounting */ + TRACE("(%p) : Forwarding to %p\n", This, This->forwardReference); + return IUnknown_AddRef(This->forwardReference); } else { /* No container, handle our own refcounting */ ULONG ref = InterlockedIncrement(&This->ref); @@ -61,15 +59,13 @@ static ULONG WINAPI IDirect3DSurface8Imp static ULONG WINAPI IDirect3DSurface8Impl_Release(LPDIRECT3DSURFACE8 iface) { IDirect3DSurface8Impl *This = (IDirect3DSurface8Impl *)iface; - IUnknown *containerParent = NULL; TRACE("(%p)\n", This); - IWineD3DSurface_GetContainerParent(This->wineD3DSurface, &containerParent); - if (containerParent) { - /* Forward to the containerParent */ - TRACE("(%p) : Forwarding to %p\n", This, containerParent); - return IUnknown_Release(containerParent); + if (This->forwardReference) { + /* Forward refcounting */ + TRACE("(%p) : Forwarding to %p\n", This, This->forwardReference); + return IUnknown_Release(This->forwardReference); } else { /* No container, handle our own refcounting */ ULONG ref = InterlockedDecrement(&This->ref); diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index e7e274c..5508c2f 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -490,7 +490,7 @@ static void test_refcount(void) /* check implicit back buffer */ hr = IDirect3DSwapChain8_GetBackBuffer(pSwapChain, 0, 0, &pBackBuffer); todo_wine CHECK_CALL( hr, "GetBackBuffer", pDevice, ++refcount); - todo_wine CHECK_REFCOUNT( pSwapChain, 1); + CHECK_REFCOUNT( pSwapChain, 1); if(pBackBuffer) { todo_wine CHECK_SURFACE_CONTAINER( pBackBuffer, IID_IDirect3DDevice8, pDevice); diff --git a/dlls/d3d8/texture.c b/dlls/d3d8/texture.c index 2ab8514..17af4ee 100644 --- a/dlls/d3d8/texture.c +++ b/dlls/d3d8/texture.c @@ -57,7 +57,7 @@ static ULONG WINAPI IDirect3DTexture8Imp TRACE("(%p) : ReleaseRef to %d\n", This, ref); if (ref == 0) { - IWineD3DTexture_Release(This->wineD3DTexture); + IWineD3DTexture_Destroy(This->wineD3DTexture, D3D8CB_DestroySurface); IUnknown_Release(This->parentDevice); HeapFree(GetProcessHeap(), 0, This); }
1
0
0
0
Markus Amsler : d3d: Callback infrastructure for implicit depth stencil surface destruction in IWineD3DDevice .
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 3fd04308abccc735542218f511e7a12b749b1fae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3fd04308abccc735542218f51…
Author: Markus Amsler <markus.amsler(a)oribi.org> Date: Tue Dec 5 00:29:31 2006 +0100 d3d: Callback infrastructure for implicit depth stencil surface destruction in IWineD3DDevice. --- dlls/d3d8/d3d8_private.h | 2 ++ dlls/d3d8/device.c | 2 +- dlls/d3d8/directx.c | 9 +++++++++ dlls/d3d9/d3d9_private.h | 2 ++ dlls/d3d9/device.c | 2 +- dlls/d3d9/directx.c | 8 ++++++++ dlls/ddraw/ddraw.c | 11 ++++++++++- dlls/ddraw/ddraw_private.h | 3 +++ dlls/ddraw/surface.c | 2 +- dlls/wined3d/device.c | 9 +++------ include/wine/wined3d_interface.h | 4 ++-- 11 files changed, 42 insertions(+), 12 deletions(-) diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index dab2638..4e8b96b 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -591,4 +591,6 @@ extern HRESULT WINAPI D3D8CB_CreateRende DWORD MultisampleQuality, BOOL Lockable, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle); +extern ULONG WINAPI D3D8CB_DestroyDepthStencilSurface (IWineD3DSurface *pSurface); + #endif /* __WINE_D3DX8_PRIVATE_H */ diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index f2b58af..565f4af 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -95,7 +95,7 @@ static ULONG WINAPI IDirect3DDevice8Impl if (ref == 0) { TRACE("Releasing wined3d device %p\n", This->WineD3DDevice); - IWineD3DDevice_Uninit3D(This->WineD3DDevice); + IWineD3DDevice_Uninit3D(This->WineD3DDevice, D3D8CB_DestroyDepthStencilSurface); IWineD3DDevice_Release(This->WineD3DDevice); HeapFree(GetProcessHeap(), 0, This->shader_handles); HeapFree(GetProcessHeap(), 0, This); diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c index c43aa4a..8c22a6e 100644 --- a/dlls/d3d8/directx.c +++ b/dlls/d3d8/directx.c @@ -285,6 +285,15 @@ HRESULT WINAPI D3D8CB_CreateDepthStencil return res; } +ULONG WINAPI D3D8CB_DestroyDepthStencilSurface(IWineD3DSurface *pSurface) { + IDirect3DSurface8Impl* surfaceParent; + TRACE("(%p) call back\n", pSurface); + + IWineD3DSurface_GetParent(pSurface, (IUnknown **) &surfaceParent); + IDirect3DSurface8_Release((IDirect3DSurface8*) surfaceParent); + return IDirect3DSurface8_Release((IDirect3DSurface8*) surfaceParent); +} + static HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviourFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DDevice8** ppReturnedDeviceInterface) { diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index 3b16ef2..5aa7ea6 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -541,4 +541,6 @@ extern HRESULT WINAPI D3D9CB_CreateRende DWORD MultisampleQuality, BOOL Lockable, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle); +extern ULONG WINAPI D3D9CB_DestroyDepthStencilSurface (IWineD3DSurface *pSurface); + #endif /* __WINE_D3D9_PRIVATE_H */ diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 87a10bb..bd96b10 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -58,7 +58,7 @@ static ULONG WINAPI IDirect3DDevice9Impl TRACE("(%p) : ReleaseRef to %d\n", This, ref); if (ref == 0) { - IWineD3DDevice_Uninit3D(This->WineD3DDevice); + IWineD3DDevice_Uninit3D(This->WineD3DDevice, D3D9CB_DestroyDepthStencilSurface); IWineD3DDevice_Release(This->WineD3DDevice); HeapFree(GetProcessHeap(), 0, This); } diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c index c190784..94f0f17 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c @@ -269,6 +269,14 @@ HRESULT WINAPI D3D9CB_CreateDepthStencil return res; } +ULONG WINAPI D3D9CB_DestroyDepthStencilSurface(IWineD3DSurface *pSurface) { + IDirect3DSurface9Impl* surfaceParent; + TRACE("(%p) call back\n", pSurface); + + IWineD3DSurface_GetParent(pSurface, (IUnknown **) &surfaceParent); + IDirect3DSurface9_Release((IDirect3DSurface9*) surfaceParent); + return IDirect3DSurface9_Release((IDirect3DSurface9*) surfaceParent); +} HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviourFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 85b040f..b613c46 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -1621,7 +1621,7 @@ IDirectDrawImpl_RecreateAllSurfaces(IDir /* Should happen almost never */ FIXME("(%p) Switching to non-opengl surfaces with d3d started. Is this a bug?\n", This); /* Shutdown d3d */ - IWineD3DDevice_Uninit3D(This->wineD3DDevice); + IWineD3DDevice_Uninit3D(This->wineD3DDevice, D3D7CB_DestroyDepthStencilSurface); } /* Contrary: D3D starting is handled by the caller, because it knows the render target */ @@ -1679,6 +1679,15 @@ D3D7CB_CreateSurface(IUnknown *device, return D3D_OK; } +ULONG WINAPI D3D7CB_DestroyDepthStencilSurface(IWineD3DSurface *pSurface) { + IUnknown* surfaceParent; + TRACE("(%p) call back\n", pSurface); + + IWineD3DSurface_GetParent(pSurface, (IUnknown **) &surfaceParent); + IUnknown_Release(surfaceParent); + return IUnknown_Release(surfaceParent); +} + /***************************************************************************** * IDirectDrawImpl_CreateNewSurface * diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index aaa61a9..9e57b2d 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -75,6 +75,9 @@ typedef struct IDirect3DExecuteBufferImp typedef struct IDirect3DVertexBufferImpl IDirect3DVertexBufferImpl; typedef struct IParentImpl IParentImpl; +/* Callbacks for implicit object destruction */ +extern ULONG WINAPI D3D7CB_DestroyDepthStencilSurface(IWineD3DSurface *pSurface); + /***************************************************************************** * IDirectDraw implementation structure *****************************************************************************/ diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index ab7eda6..cab163b 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -311,7 +311,7 @@ IDirectDrawSurfaceImpl_Release(IDirectDr IWineD3DDevice_SetIndices(ddraw->wineD3DDevice, NULL, 0); IWineD3DDevice_SetDepthStencilSurface(ddraw->wineD3DDevice, NULL); - if(IWineD3DDevice_Uninit3D(ddraw->wineD3DDevice) != D3D_OK) + if(IWineD3DDevice_Uninit3D(ddraw->wineD3DDevice, D3D7CB_DestroyDepthStencilSurface) != D3D_OK) { /* Not good */ ERR("(%p) Failed to uninit 3D\n", This); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index a12af38..939dfbe 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2148,10 +2148,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface) { +static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, D3DCB_DESTROYSURFACEFN D3DCB_DestroyDepthStencilSurface) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; int sampler; - IUnknown* stencilBufferParent; IUnknown* swapChainParent; uint i; TRACE("(%p)\n", This); @@ -2186,10 +2185,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl This->renderTarget = NULL; if (This->depthStencilBuffer) { - IWineD3DSurface_GetParent(This->depthStencilBuffer, &stencilBufferParent); - IUnknown_Release(stencilBufferParent); /* once for the get parent */ - if(IUnknown_Release(stencilBufferParent) >0){ /* the second time for when it was created */ - FIXME("(%p) Something's still holding the depthStencilBuffer\n",This); + if(D3DCB_DestroyDepthStencilSurface > 0) { + FIXME("(%p) Something's still holding the depthStencilBuffer\n", This); } This->depthStencilBuffer = NULL; } diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index 58ab88a..6017818 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -359,7 +359,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD STDMETHOD(CreatePixelShader)(THIS_ CONST DWORD* pFunction, struct IWineD3DPixelShader** ppShader, IUnknown *pParent) PURE; STDMETHOD_(HRESULT,CreatePalette)(THIS_ DWORD Flags, PALETTEENTRY *PalEnt, struct IWineD3DPalette **Palette, IUnknown *Parent); STDMETHOD(Init3D)(THIS_ WINED3DPRESENT_PARAMETERS* pPresentationParameters, D3DCB_CREATEADDITIONALSWAPCHAIN D3DCB_CreateAdditionalSwapChain); - STDMETHOD(Uninit3D)(THIS); + STDMETHOD(Uninit3D)(THIS, D3DCB_DESTROYSURFACEFN pFn); STDMETHOD_(void, SetFullscreen)(THIS_ BOOL fullscreen); STDMETHOD(EnumDisplayModes)(THIS_ DWORD Flags, UINT Width, UINT Height, WINED3DFORMAT Format, void *context, D3DCB_ENUMDISPLAYMODESCALLBACK cb) PURE; STDMETHOD(EvictManagedResources)(THIS) PURE; @@ -499,7 +499,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD #define IWineD3DDevice_CreatePixelShader(p,a,b,c) (p)->lpVtbl->CreatePixelShader(p,a,b,c) #define IWineD3DDevice_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d) #define IWineD3DDevice_Init3D(p, a, b) (p)->lpVtbl->Init3D(p, a, b) -#define IWineD3DDevice_Uninit3D(p) (p)->lpVtbl->Uninit3D(p) +#define IWineD3DDevice_Uninit3D(p, a) (p)->lpVtbl->Uninit3D(p, a) #define IWineD3DDevice_SetFullscreen(p, a) (p)->lpVtbl->SetFullscreen(p, a) #define IWineD3DDevice_EnumDisplayModes(p,a,b,c,d,e,f) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d,e,f) #define IWineD3DDevice_EvictManagedResources(p) (p)->lpVtbl->EvictManagedResources(p)
1
0
0
0
Markus Amsler : d3d: Callback infrastructure for implicit volume destruction in IWineD3DVolumeTexture .
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 50a0c21265e3cd41026025073e2ea5074258788c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=50a0c21265e3cd41026025073…
Author: Markus Amsler <markus.amsler(a)oribi.org> Date: Tue Dec 5 00:29:21 2006 +0100 d3d: Callback infrastructure for implicit volume destruction in IWineD3DVolumeTexture. --- dlls/wined3d/directx.c | 10 ++++++++++ dlls/wined3d/volumetexture.c | 37 +++++++++++++++++-------------------- dlls/wined3d/wined3d_private.h | 2 ++ include/wine/wined3d_interface.h | 4 ++++ 4 files changed, 33 insertions(+), 20 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 5f8bb74..59f8c83 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2500,6 +2500,16 @@ ULONG WINAPI D3DCB_DefaultDestroySurface return IUnknown_Release(surfaceParent); } +ULONG WINAPI D3DCB_DefaultDestroyVolume(IWineD3DVolume *pVolume) { + IUnknown* volumeParent; + TRACE("(%p) call back\n", pVolume); + + /* Now, release the parent, which will take care of cleaning up the volume for us */ + IWineD3DVolume_GetParent(pVolume, &volumeParent); + IUnknown_Release(volumeParent); + return IUnknown_Release(volumeParent); +} + /********************************************************** * IWineD3D VTbl follows **********************************************************/ diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 13c0e1e..46e0c4d 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -55,29 +55,10 @@ static ULONG WINAPI IWineD3DVolumeTextur static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DVolumeTexture *iface) { IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; ULONG ref; - int i; TRACE("(%p) : Releasing from %d\n", This, This->resource.ref); ref = InterlockedDecrement(&This->resource.ref); if (ref == 0) { - for (i = 0; i < This->baseTexture.levels; i++) { - if (This->volumes[i] != NULL) { - /* Since the volumes were created by callback, the texture is - * keeping the reference to the parent, so the texture should - * release it. */ - IUnknown *volumeParent = NULL; - - TRACE("(%p) : Releasing volume %p\n", This, This->volumes[i]); - - /* Cleanup the container */ - IWineD3DVolume_SetContainer(This->volumes[i], 0); - /* Now, release the parent, which will take care of cleaning up the volume for us */ - IWineD3DVolume_GetParent(This->volumes[i], &volumeParent); - IUnknown_Release(volumeParent); /* Once for the reference GetParent added */ - IUnknown_Release(volumeParent); /* Once for the reference we're keeping */ - } - } - IWineD3DBaseTextureImpl_CleanUp((IWineD3DBaseTexture *) iface); - HeapFree(GetProcessHeap(), 0, This); + IWineD3DVolumeTexture_Destroy(iface, D3DCB_DefaultDestroyVolume); } return ref; } @@ -207,6 +188,21 @@ static void WINAPI IWineD3DVolumeTexture /* ******************************************* IWineD3DVolumeTexture IWineD3DVolumeTexture parts follow ******************************************* */ +static void WINAPI IWineD3DVolumeTextureImpl_Destroy(IWineD3DVolumeTexture *iface, D3DCB_DESTROYVOLUMEFN D3DCB_DestroyVolume) { + IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; + int i; + TRACE("(%p) : Cleaning up\n",This); + for (i = 0; i < This->baseTexture.levels; i++) { + if (This->volumes[i] != NULL) { + /* Cleanup the container */ + IWineD3DVolume_SetContainer(This->volumes[i], 0); + D3DCB_DestroyVolume(This->volumes[i]); + } + } + IWineD3DBaseTextureImpl_CleanUp((IWineD3DBaseTexture *) iface); + HeapFree(GetProcessHeap(), 0, This); +} + static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetLevelDesc(IWineD3DVolumeTexture *iface, UINT Level,WINED3DVOLUME_DESC *pDesc) { IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; if (Level < This->baseTexture.levels) { @@ -298,6 +294,7 @@ const IWineD3DVolumeTextureVtbl IWineD3D IWineD3DVolumeTextureImpl_GetTextureDimensions, IWineD3DVolumeTextureImpl_ApplyStateChanges, /* volume texture */ + IWineD3DVolumeTextureImpl_Destroy, IWineD3DVolumeTextureImpl_GetLevelDesc, IWineD3DVolumeTextureImpl_GetVolumeLevel, IWineD3DVolumeTextureImpl_LockBox, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 208ec0b..8eea594 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -419,6 +419,8 @@ BOOL IWineD3DImpl_FillGLCaps(IWineD3D *i /* Default callbacks for implicit object destruction */ extern ULONG WINAPI D3DCB_DefaultDestroySurface(IWineD3DSurface *pSurface); +extern ULONG WINAPI D3DCB_DefaultDestroyVolume(IWineD3DVolume *pSurface); + /***************************************************************************** * Internal representation of a light */ diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index f546872..58ab88a 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -245,6 +245,8 @@ typedef HRESULT WINAPI (*D3DCB_ENUMDISPL */ typedef ULONG WINAPI (*D3DCB_DESTROYSURFACEFN) (struct IWineD3DSurface *pSurface); +typedef ULONG WINAPI (*D3DCB_DESTROYVOLUMEFN) (struct IWineD3DVolume *pVolume); + /***************************************************************************** * IWineD3DBase interface */ @@ -1025,6 +1027,7 @@ DECLARE_INTERFACE_(IWineD3DVolumeTexture STDMETHOD_(UINT, GetTextureDimensions)(THIS) PURE; STDMETHOD_(void, ApplyStateChanges)(THIS_ const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1], const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) PURE; /*** IWineD3DVolumeTexture methods ***/ + STDMETHOD_(void, Destroy)(THIS_ D3DCB_DESTROYVOLUMEFN pFn) PURE; STDMETHOD(GetLevelDesc)(THIS_ UINT Level, WINED3DVOLUME_DESC *pDesc) PURE; STDMETHOD(GetVolumeLevel)(THIS_ UINT Level, struct IWineD3DVolume** ppVolumeLevel) PURE; STDMETHOD(LockBox)(THIS_ UINT Level, WINED3DLOCKED_BOX* pLockedVolume, CONST WINED3DBOX* pBox, DWORD Flags) PURE; @@ -1063,6 +1066,7 @@ DECLARE_INTERFACE_(IWineD3DVolumeTexture #define IWineD3DVolumeTexture_GetTextureDimensions(p) (p)->lpVtbl->GetTextureDimensions(p) #define IWineD3DVolumeTexture_ApplyStateChanges(p,a,b) (p)->lpVtbl->ApplyStateChanges(p,a,b) /*** IWineD3DVolumeTexture methods ***/ +#define IWineD3DVolumeTexture_Destroy(p,a) (p)->lpVtbl->Destroy(p,a) #define IWineD3DVolumeTexture_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b) #define IWineD3DVolumeTexture_GetVolumeLevel(p,a,b) (p)->lpVtbl->GetVolumeLevel(p,a,b) #define IWineD3DVolumeTexture_LockBox(p,a,b,c,d) (p)->lpVtbl->LockBox(p,a,b,c,d)
1
0
0
0
Markus Amsler : d3d: Callback infrastructure for implicit render target destruction in IWineD3DSwapChain .
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: cb8652947adceba566c93d21e54021661e803799 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cb8652947adceba566c93d21e…
Author: Markus Amsler <markus.amsler(a)oribi.org> Date: Tue Dec 5 00:29:14 2006 +0100 d3d: Callback infrastructure for implicit render target destruction in IWineD3DSwapChain. --- dlls/wined3d/swapchain.c | 71 +++++++++++++++++++------------------ include/wine/wined3d_interface.h | 3 +- 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index b9bf032..865703d 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -88,41 +88,7 @@ static ULONG WINAPI IWineD3DSwapChainImp refCount = InterlockedDecrement(&This->ref); TRACE("(%p) : ReleaseRef to %d\n", This, refCount); if (refCount == 0) { - IUnknown* bufferParent; - - /* release the ref to the front and back buffer parents */ - if(This->frontBuffer) { - IWineD3DSurface_SetContainer(This->frontBuffer, 0); - IWineD3DSurface_GetParent(This->frontBuffer, &bufferParent); - IUnknown_Release(bufferParent); /* once for the get parent */ - if(IUnknown_Release(bufferParent) > 0){ - FIXME("(%p) Something's still holding the front buffer\n",This); - } - } - - if(This->backBuffer) { - int i; - for(i = 0; i < This->presentParms.BackBufferCount; i++) { - IWineD3DSurface_SetContainer(This->backBuffer[i], 0); - IWineD3DSurface_GetParent(This->backBuffer[i], &bufferParent); - IUnknown_Release(bufferParent); /* once for the get parent */ - if(IUnknown_Release(bufferParent) > 0){ - FIXME("(%p) Something's still holding the back buffer\n",This); - } - } - } - - /* Clean up the context */ - /* check that we are the current context first */ - if(glXGetCurrentContext() == This->glCtx){ - glXMakeCurrent(This->display, None, NULL); - } - glXDestroyContext(This->display, This->glCtx); - /* IUnknown_Release(This->parent); This should only apply to the primary swapchain, - all others are created by the caller, so releasing the parent should cause - the child to be released, not the other way around! - */ - HeapFree(GetProcessHeap(), 0, This); + IWineD3DSwapChain_Destroy(iface, D3DCB_DefaultDestroySurface); } return refCount; } @@ -136,6 +102,40 @@ static HRESULT WINAPI IWineD3DSwapChainI } /*IWineD3DSwapChain parts follow: */ +static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB_DESTROYSURFACEFN D3DCB_DestroyRenderTarget) { + IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; + + /* release the ref to the front and back buffer parents */ + if(This->frontBuffer) { + IWineD3DSurface_SetContainer(This->frontBuffer, 0); + if(D3DCB_DestroyRenderTarget(This->frontBuffer) > 0) { + FIXME("(%p) Something's still holding the front buffer\n",This); + } + } + + if(This->backBuffer) { + int i; + for(i = 0; i < This->presentParms.BackBufferCount; i++) { + IWineD3DSurface_SetContainer(This->backBuffer[i], 0); + if(D3DCB_DestroyRenderTarget(This->backBuffer[i]) > 0) { + FIXME("(%p) Something's still holding the back buffer\n",This); + } + } + } + + /* Clean up the context */ + /* check that we are the current context first */ + if(glXGetCurrentContext() == This->glCtx){ + glXMakeCurrent(This->display, None, NULL); + } + glXDestroyContext(This->display, This->glCtx); + /* IUnknown_Release(This->parent); This should only apply to the primary swapchain, + all others are created by the caller, so releasing the parent should cause + the child to be released, not the other way around! + */ + HeapFree(GetProcessHeap(), 0, This); +} + static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) { IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; @@ -572,6 +572,7 @@ IWineD3DSwapChainVtbl IWineD3DSwapChain_ IWineD3DSwapChainImpl_Release, /* IWineD3DSwapChain */ IWineD3DSwapChainImpl_GetParent, + IWineD3DSwapChainImpl_Destroy, IWineD3DSwapChainImpl_GetDevice, IWineD3DSwapChainImpl_Present, IWineD3DSwapChainImpl_GetFrontBufferData, diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index cb59eba..f546872 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -1367,6 +1367,7 @@ DECLARE_INTERFACE_(IWineD3DSwapChain,IWi /*** IWineD3DBase methods ***/ STDMETHOD(GetParent)(THIS_ IUnknown **pParent) PURE; /*** IDirect3DSwapChain9 methods ***/ + STDMETHOD_(void, Destroy)(THIS_ D3DCB_DESTROYSURFACEFN pFn) PURE; STDMETHOD(GetDevice)(THIS_ IWineD3DDevice **ppDevice) PURE; STDMETHOD(Present)(THIS_ CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) PURE; STDMETHOD(GetFrontBufferData)(THIS_ IWineD3DSurface *pDestSurface) PURE; @@ -1387,7 +1388,7 @@ DECLARE_INTERFACE_(IWineD3DSwapChain,IWi /*** IWineD3DBase methods ***/ #define IWineD3DSwapChain_GetParent(p,a) (p)->lpVtbl->GetParent(p,a) /*** IWineD3DSwapChain methods ***/ - +#define IWineD3DSwapChain_Destroy(p,a) (p)->lpVtbl->Destroy(p,a) #define IWineD3DSwapChain_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) #define IWineD3DSwapChain_Present(p,a,b,c,d,e) (p)->lpVtbl->Present(p,a,b,c,d,e) #define IWineD3DSwapChain_GetFrontBufferData(p,a) (p)->lpVtbl->GetFrontBufferData(p,a)
1
0
0
0
Markus Amsler : d3d: Callback infrastructure for implicit surface destruction in IWineD3DCubeTexture .
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 2946f7a26747728f0060d8346e94c2f2d445b5ed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2946f7a26747728f0060d8346…
Author: Markus Amsler <markus.amsler(a)oribi.org> Date: Tue Dec 5 00:29:08 2006 +0100 d3d: Callback infrastructure for implicit surface destruction in IWineD3DCubeTexture. --- dlls/wined3d/cubetexture.c | 44 +++++++++++++++++++------------------- include/wine/wined3d_interface.h | 2 + 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c index a55fdb1..f3df9f4 100644 --- a/dlls/wined3d/cubetexture.c +++ b/dlls/wined3d/cubetexture.c @@ -67,28 +67,7 @@ static ULONG WINAPI IWineD3DCubeTextureI TRACE("(%p) : Releasing from %d\n", This, This->resource.ref); ref = InterlockedDecrement(&This->resource.ref); if (ref == 0) { - int i,j; - TRACE("(%p) : Cleaning up\n",This); - for (i = 0; i < This->baseTexture.levels; i++) { - for (j = 0; j < 6; j++) { - if (This->surfaces[j][i] != NULL) { - /* Because the surfaces were created using a callback we need to release there parent otehrwise we leave the parent hanging */ - IUnknown* surfaceParent; - /* Clean out the texture name we gave to the surface so that the surface doesn't try and release it */ - IWineD3DSurface_SetGlTextureDesc(This->surfaces[j][i], 0, 0); - /* Cleanup the container */ - IWineD3DSurface_SetContainer(This->surfaces[j][i], 0); - /* Now, release the parent, which will take care of cleaning up the surface for us */ - TRACE("(%p) : Releasing surface%d %d %p\n", This, j, i, This->surfaces[j][i]); - IWineD3DSurface_GetParent(This->surfaces[j][i], &surfaceParent); - IUnknown_Release(surfaceParent); - IUnknown_Release(surfaceParent); - } - } - } - IWineD3DBaseTextureImpl_CleanUp((IWineD3DBaseTexture *) iface); - /* finally delete the object */ - HeapFree(GetProcessHeap(), 0, This); + IWineD3DCubeTexture_Destroy(iface, D3DCB_DefaultDestroySurface); } return ref; } @@ -256,6 +235,26 @@ static void WINAPI IWineD3DCubeTextureIm /* ******************************************* IWineD3DCubeTexture IWineD3DCubeTexture parts follow ******************************************* */ +static void WINAPI IWineD3DCubeTextureImpl_Destroy(IWineD3DCubeTexture *iface, D3DCB_DESTROYSURFACEFN D3DCB_DestroySurface) { + IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; + int i,j; + TRACE("(%p) : Cleaning up\n",This); + for (i = 0; i < This->baseTexture.levels; i++) { + for (j = 0; j < 6; j++) { + if (This->surfaces[j][i] != NULL) { + /* Clean out the texture name we gave to the surface so that the surface doesn't try and release it */ + IWineD3DSurface_SetGlTextureDesc(This->surfaces[j][i], 0, 0); + /* Cleanup the container */ + IWineD3DSurface_SetContainer(This->surfaces[j][i], 0); + D3DCB_DestroySurface(This->surfaces[j][i]); + } + } + } + IWineD3DBaseTextureImpl_CleanUp((IWineD3DBaseTexture *) iface); + /* finally delete the object */ + HeapFree(GetProcessHeap(), 0, This); +} + static HRESULT WINAPI IWineD3DCubeTextureImpl_GetLevelDesc(IWineD3DCubeTexture *iface, UINT Level, WINED3DSURFACE_DESC* pDesc) { IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; @@ -363,6 +362,7 @@ const IWineD3DCubeTextureVtbl IWineD3DCu IWineD3DCubeTextureImpl_GetTextureDimensions, IWineD3DCubeTextureImpl_ApplyStateChanges, /* IWineD3DCubeTexture */ + IWineD3DCubeTextureImpl_Destroy, IWineD3DCubeTextureImpl_GetLevelDesc, IWineD3DCubeTextureImpl_GetCubeMapSurface, IWineD3DCubeTextureImpl_LockRect, diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index 1e0e08e..cb59eba 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -942,6 +942,7 @@ DECLARE_INTERFACE_(IWineD3DCubeTexture,I STDMETHOD_(UINT, GetTextureDimensions)(THIS) PURE; STDMETHOD_(void, ApplyStateChanges)(THIS_ DWORD const textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1], const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) PURE; /*** IWineD3DCubeTexture methods ***/ + STDMETHOD_(void, Destroy)(THIS_ D3DCB_DESTROYSURFACEFN pFn) PURE; STDMETHOD(GetLevelDesc)(THIS_ UINT Level,WINED3DSURFACE_DESC* pDesc) PURE; STDMETHOD(GetCubeMapSurface)(THIS_ WINED3DCUBEMAP_FACES FaceType, UINT Level, struct IWineD3DSurface** ppCubeMapSurface) PURE; STDMETHOD(LockRect)(THIS_ WINED3DCUBEMAP_FACES FaceType, UINT Level, WINED3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) PURE; @@ -980,6 +981,7 @@ DECLARE_INTERFACE_(IWineD3DCubeTexture,I #define IWineD3DCubeTexture_GetTextureDimensions(p) (p)->lpVtbl->GetTextureDimensions(p) #define IWineD3DCubeTexture_ApplyStateChanges(p,a,b) (p)->lpVtbl->ApplyStateChanges(p,a,b) /*** IWineD3DCubeTexture methods ***/ +#define IWineD3DCubeTexture_Destroy(p,a) (p)->lpVtbl->Destroy(p,a) #define IWineD3DCubeTexture_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b) #define IWineD3DCubeTexture_GetCubeMapSurface(p,a,b,c) (p)->lpVtbl->GetCubeMapSurface(p,a,b,c) #define IWineD3DCubeTexture_LockRect(p,a,b,c,d,e) (p)->lpVtbl->LockRect(p,a,b,c,d,e)
1
0
0
0
Markus Amsler : d3d: Callback infrastructure for implicit surface destruction in IWineD3DTexture .
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 04ae4596ffeef88e6fc409bce207e19654a8ba81 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=04ae4596ffeef88e6fc409bce…
Author: Markus Amsler <markus.amsler(a)oribi.org> Date: Tue Dec 5 00:28:58 2006 +0100 d3d: Callback infrastructure for implicit surface destruction in IWineD3DTexture. --- dlls/wined3d/directx.c | 10 ++++++++ dlls/wined3d/texture.c | 43 +++++++++++++++++++------------------ dlls/wined3d/wined3d_private.h | 3 ++ include/wine/wined3d_interface.h | 7 ++++++ 4 files changed, 42 insertions(+), 21 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index dd50ecf..5f8bb74 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2490,6 +2490,16 @@ static HRESULT WINAPI IWineD3DImpl_GetPa return WINED3D_OK; } +ULONG WINAPI D3DCB_DefaultDestroySurface(IWineD3DSurface *pSurface) { + IUnknown* surfaceParent; + TRACE("(%p) call back\n", pSurface); + + /* Now, release the parent, which will take care of cleaning up the surface for us */ + IWineD3DSurface_GetParent(pSurface, &surfaceParent); + IUnknown_Release(surfaceParent); + return IUnknown_Release(surfaceParent); +} + /********************************************************** * IWineD3D VTbl follows **********************************************************/ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index a1ce721..e9a78cc 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -58,31 +58,12 @@ static ULONG WINAPI IWineD3DTextureImpl_ TRACE("(%p) : Releasing from %d\n", This, This->resource.ref); ref = InterlockedDecrement(&This->resource.ref); if (ref == 0) { - int i; - - TRACE("(%p) : Cleaning up\n",This); - for (i = 0; i < This->baseTexture.levels; i++) { - if (This->surfaces[i] != NULL) { - /* Because the surfaces were created using a callback we need to release there parent otehrwise we leave the parent hanging */ - IUnknown* surfaceParent; - /* Clean out the texture name we gave to the surface so that the surface doesn't try and release it */ - IWineD3DSurface_SetGlTextureDesc(This->surfaces[i], 0, 0); - /* Cleanup the container */ - IWineD3DSurface_SetContainer(This->surfaces[i], 0); - /* Now, release the parent, which will take care of cleaning up the surface for us */ - IWineD3DSurface_GetParent(This->surfaces[i], &surfaceParent); - IUnknown_Release(surfaceParent); - IUnknown_Release(surfaceParent); - } - } - TRACE("(%p) : cleaning up base texture\n", This); - IWineD3DBaseTextureImpl_CleanUp((IWineD3DBaseTexture *)iface); - /* free the object */ - HeapFree(GetProcessHeap(), 0, This); + IWineD3DTexture_Destroy(iface, D3DCB_DefaultDestroySurface); } return ref; } + /* **************************************************** IWineD3DTexture IWineD3DResource parts follow **************************************************** */ @@ -246,6 +227,25 @@ static void WINAPI IWineD3DTextureImpl_A /* ******************************************* IWineD3DTexture IWineD3DTexture parts follow ******************************************* */ +static void WINAPI IWineD3DTextureImpl_Destroy(IWineD3DTexture *iface, D3DCB_DESTROYSURFACEFN D3DCB_DestroySurface) { + IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; + int i; + + TRACE("(%p) : Cleaning up\n",This); + for (i = 0; i < This->baseTexture.levels; i++) { + if (This->surfaces[i] != NULL) { + /* Clean out the texture name we gave to the surface so that the surface doesn't try and release it */ + IWineD3DSurface_SetGlTextureDesc(This->surfaces[i], 0, 0); + IWineD3DSurface_SetContainer(This->surfaces[i], 0); + D3DCB_DestroySurface(This->surfaces[i]); + } + } + TRACE("(%p) : cleaning up base texture\n", This); + IWineD3DBaseTextureImpl_CleanUp((IWineD3DBaseTexture *)iface); + /* free the object */ + HeapFree(GetProcessHeap(), 0, This); +} + static HRESULT WINAPI IWineD3DTextureImpl_GetLevelDesc(IWineD3DTexture *iface, UINT Level, WINED3DSURFACE_DESC* pDesc) { IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; @@ -343,6 +343,7 @@ const IWineD3DTextureVtbl IWineD3DTextur IWineD3DTextureImpl_GetTextureDimensions, IWineD3DTextureImpl_ApplyStateChanges, /* IWineD3DTexture */ + IWineD3DTextureImpl_Destroy, IWineD3DTextureImpl_GetLevelDesc, IWineD3DTextureImpl_GetSurfaceLevel, IWineD3DTextureImpl_LockRect, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0776767..208ec0b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -416,6 +416,9 @@ BOOL IWineD3DImpl_FillGLCaps(IWineD3D *i #define WINE_D3D8_CAPABLE(gl_info) WINE_D3D7_CAPABLE(gl_info) && (gl_info->supported[ARB_MULTISAMPLE] && gl_info->supported[ARB_TEXTURE_BORDER_CLAMP]) #define WINE_D3D9_CAPABLE(gl_info) WINE_D3D8_CAPABLE(gl_info) && (gl_info->supported[ARB_FRAGMENT_PROGRAM] && gl_info->supported[ARB_VERTEX_SHADER]) +/* Default callbacks for implicit object destruction */ +extern ULONG WINAPI D3DCB_DefaultDestroySurface(IWineD3DSurface *pSurface); + /***************************************************************************** * Internal representation of a light */ diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index 6a779f3..1e0e08e 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -241,6 +241,11 @@ typedef HRESULT WINAPI (*D3DCB_ENUMDISPL LPVOID context); /***************************************************************************** + * Callback functions for custom implicit surface / volume destruction. + */ +typedef ULONG WINAPI (*D3DCB_DESTROYSURFACEFN) (struct IWineD3DSurface *pSurface); + +/***************************************************************************** * IWineD3DBase interface */ @@ -855,6 +860,7 @@ DECLARE_INTERFACE_(IWineD3DTexture,IWine STDMETHOD_(UINT, GetTextureDimensions)(THIS) PURE; STDMETHOD_(void, ApplyStateChanges)(THIS_ const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1], const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) PURE; /*** IWineD3DTexture methods ***/ + STDMETHOD_(void, Destroy)(THIS_ D3DCB_DESTROYSURFACEFN pFn) PURE; STDMETHOD(GetLevelDesc)(THIS_ UINT Level, WINED3DSURFACE_DESC* pDesc) PURE; STDMETHOD(GetSurfaceLevel)(THIS_ UINT Level, struct IWineD3DSurface** ppSurfaceLevel) PURE; STDMETHOD(LockRect)(THIS_ UINT Level, WINED3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) PURE; @@ -893,6 +899,7 @@ DECLARE_INTERFACE_(IWineD3DTexture,IWine #define IWineD3DTexture_GetTextureDimensions(p) (p)->lpVtbl->GetTextureDimensions(p) #define IWineD3DTexture_ApplyStateChanges(p,a,b) (p)->lpVtbl->ApplyStateChanges(p,a,b) /*** IWineD3DTexture methods ***/ +#define IWineD3DTexture_Destroy(p,a) (p)->lpVtbl->Destroy(p,a) #define IWineD3DTexture_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b) #define IWineD3DTexture_GetSurfaceLevel(p,a,b) (p)->lpVtbl->GetSurfaceLevel(p,a,b) #define IWineD3DTexture_LockRect(p,a,b,c,d) (p)->lpVtbl->LockRect(p,a,b,c,d)
1
0
0
0
Stefan Dösinger : wine/list.h: Added list_move_head and list_move_tail.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 3d8cdfb190880b511cc56254a48eceb926b51a09 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d8cdfb190880b511cc56254a…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Mon Dec 4 16:12:58 2006 +0100 wine/list.h: Added list_move_head and list_move_tail. --- include/wine/list.h | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/include/wine/list.h b/include/wine/list.h index 6ceef8c..a0b37cc 100644 --- a/include/wine/list.h +++ b/include/wine/list.h @@ -139,6 +139,30 @@ inline static void list_init( struct lis list->next = list->prev = list; } +/* move all elements from src to the tail of dst */ +inline static void list_move_tail( struct list *dst, struct list *src ) +{ + if (list_empty(src)) return; + + dst->prev->next = src->next; + src->next->prev = dst->prev; + dst->prev = src->prev; + src->prev->next = dst; + list_init(src); +} + +/* move all elements from src to the head of dst */ +inline static void list_move_head( struct list *dst, struct list *src ) +{ + if (list_empty(src)) return; + + dst->next->prev = src->prev; + src->prev->next = dst->next; + dst->next = src->next; + src->next->prev = dst; + list_init(src); +} + /* iterate through the list */ #define LIST_FOR_EACH(cursor,list) \ for ((cursor) = (list)->next; (cursor) != (list); (cursor) = (cursor)->next)
1
0
0
0
Francois Gouget : dmime: Remove resolve_STREAM_SEEK(), it is unused.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: 13b974bdff264ed614db8e2fd56a7c14414bf9a2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=13b974bdff264ed614db8e2fd…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Dec 6 12:06:17 2006 +0100 dmime: Remove resolve_STREAM_SEEK(), it is unused. --- dlls/dmime/dmutils.c | 14 -------------- dlls/dmime/dmutils.h | 2 -- 2 files changed, 0 insertions(+), 16 deletions(-) diff --git a/dlls/dmime/dmutils.c b/dlls/dmime/dmutils.c index 6b60598..992a2d2 100644 --- a/dlls/dmime/dmutils.c +++ b/dlls/dmime/dmutils.c @@ -233,20 +233,6 @@ HRESULT IDirectMusicUtils_IPersistStream return S_OK; } -/* translate STREAM_SEEK flag to string */ -const char *resolve_STREAM_SEEK (DWORD flag) { - switch (flag) { - case STREAM_SEEK_SET: - return wine_dbg_sprintf ("STREAM_SEEK_SET"); - case STREAM_SEEK_CUR: - return wine_dbg_sprintf ("STREAM_SEEK_CUR"); - case STREAM_SEEK_END: - return wine_dbg_sprintf ("STREAM_SEEK_END"); - default: - return wine_dbg_sprintf ("()"); - } -} - /* FOURCC to string conversion for debug messages */ const char *debugstr_fourcc (DWORD fourcc) { if (!fourcc) return "'null'"; diff --git a/dlls/dmime/dmutils.h b/dlls/dmime/dmutils.h index 4d3292a..8bca6b5 100644 --- a/dlls/dmime/dmutils.h +++ b/dlls/dmime/dmutils.h @@ -64,8 +64,6 @@ typedef struct { extern int even_or_odd (DWORD number); /* check whether chunkID is valid dmobject form chunk */ extern BOOL IS_VALID_DMFORM (FOURCC chunkID); -/* translate STREAM_SEEK flag to string */ -extern const char *resolve_STREAM_SEEK (DWORD flag); /* FOURCC to string conversion for debug messages */ extern const char *debugstr_fourcc (DWORD fourcc); /* DMUS_VERSION struct to string conversion for debug messages */
1
0
0
0
Francois Gouget : ole32: Convert dump_user_flags() into debugstr_user_flags (), a proper debug trace function.
by Alexandre Julliard
06 Dec '06
06 Dec '06
Module: wine Branch: master Commit: dd6e948d8421137a150ef48cbfb96d7561043b77 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd6e948d8421137a150ef48cb…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Dec 6 12:06:03 2006 +0100 ole32: Convert dump_user_flags() into debugstr_user_flags(), a proper debug trace function. --- dlls/ole32/usrmarshal.c | 72 ++++++++++++++++++++++++++++------------------- 1 files changed, 43 insertions(+), 29 deletions(-) diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c index a92dfa0..2ffc2a1 100644 --- a/dlls/ole32/usrmarshal.c +++ b/dlls/ole32/usrmarshal.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <stdio.h> #include <stdarg.h> #include <string.h> @@ -43,20 +44,33 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); #define ALIGN_LENGTH(_Len, _Align) _Len = ALIGNED_LENGTH(_Len, _Align) #define ALIGN_POINTER(_Ptr, _Align) _Ptr = ALIGNED_POINTER(_Ptr, _Align) -static void dump_user_flags(ULONG *pFlags) +static const char* debugstr_user_flags(ULONG *pFlags) { - if (HIWORD(*pFlags) == NDR_LOCAL_DATA_REPRESENTATION) - TRACE("MAKELONG(NDR_LOCAL_REPRESENTATION, "); - else - TRACE("MAKELONG(0x%04x, ", HIWORD(*pFlags)); + char buf[12]; + const char* loword; switch (LOWORD(*pFlags)) { - case MSHCTX_LOCAL: TRACE("MSHCTX_LOCAL)"); break; - case MSHCTX_NOSHAREDMEM: TRACE("MSHCTX_NOSHAREDMEM)"); break; - case MSHCTX_DIFFERENTMACHINE: TRACE("MSHCTX_DIFFERENTMACHINE)"); break; - case MSHCTX_INPROC: TRACE("MSHCTX_INPROC)"); break; - default: TRACE("%d)", LOWORD(*pFlags)); + case MSHCTX_LOCAL: + loword="MSHCTX_LOCAL"; + break; + case MSHCTX_NOSHAREDMEM: + loword="MSHCTX_NOSHAREDMEM"; + break; + case MSHCTX_DIFFERENTMACHINE: + loword="MSHCTX_DIFFERENTMACHINE"; + break; + case MSHCTX_INPROC: + loword="MSHCTX_INPROC"; + break; + default: + sprintf(buf, "%d", LOWORD(*pFlags)); + loword=buf; } + + if (HIWORD(*pFlags) == NDR_LOCAL_DATA_REPRESENTATION) + return wine_dbg_sprintf("MAKELONG(NDR_LOCAL_REPRESENTATION, %s)", loword); + else + return wine_dbg_sprintf("MAKELONG(0x%04x, %s)", HIWORD(*pFlags), loword); } /****************************************************************************** @@ -83,7 +97,7 @@ ULONG __RPC_USER CLIPFORMAT_UserSize(ULO { ULONG size = StartingSize; - TRACE("("); dump_user_flags(pFlags); TRACE(", %d, %p\n", StartingSize, pCF); + TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, pCF); size += sizeof(userCLIPFORMAT); @@ -128,7 +142,7 @@ unsigned char * __RPC_USER CLIPFORMAT_Us { wireCLIPFORMAT wirecf = (wireCLIPFORMAT)pBuffer; - TRACE("("); dump_user_flags(pFlags); TRACE(", %p, &0x%04x\n", pBuffer, *pCF); + TRACE("(%s, %p, &0x%04x\n", debugstr_user_flags(pFlags), pBuffer, *pCF); wirecf->u.dwValue = *pCF; pBuffer += sizeof(*wirecf); @@ -185,7 +199,7 @@ unsigned char * __RPC_USER CLIPFORMAT_Us { wireCLIPFORMAT wirecf = (wireCLIPFORMAT)pBuffer; - TRACE("("); dump_user_flags(pFlags); TRACE(", %p, %p\n", pBuffer, pCF); + TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, pCF); pBuffer += sizeof(*wirecf); if (wirecf->fContext == WDT_INPROC_CALL) @@ -282,25 +296,25 @@ static void __RPC_USER handle_UserFree(U #define IMPL_WIREM_HANDLE(type) \ ULONG __RPC_USER type##_UserSize(ULONG *pFlags, ULONG StartingSize, type *handle) \ { \ - TRACE("("); dump_user_flags(pFlags); TRACE(", %d, %p\n", StartingSize, handle); \ + TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, handle); \ return handle_UserSize(pFlags, StartingSize, (HANDLE *)handle); \ } \ \ unsigned char * __RPC_USER type##_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, type *handle) \ { \ - TRACE("("); dump_user_flags(pFlags); TRACE(", %p, &%p\n", pBuffer, *handle); \ + TRACE("(%s, %p, &%p\n", debugstr_user_flags(pFlags), pBuffer, *handle); \ return handle_UserMarshal(pFlags, pBuffer, (HANDLE *)handle); \ } \ \ unsigned char * __RPC_USER type##_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, type *handle) \ { \ - TRACE("("); dump_user_flags(pFlags); TRACE(", %p, %p\n", pBuffer, handle); \ + TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, handle); \ return handle_UserUnmarshal(pFlags, pBuffer, (HANDLE *)handle); \ } \ \ void __RPC_USER type##_UserFree(ULONG *pFlags, type *handle) \ { \ - TRACE("("); dump_user_flags(pFlags); TRACE(", &%p\n", *handle); \ + TRACE("(%s, &%p\n", debugstr_user_flags(pFlags), *handle); \ return handle_UserFree(pFlags, (HANDLE *)handle); \ } @@ -315,7 +329,7 @@ ULONG __RPC_USER HGLOBAL_UserSize(ULONG { ULONG size = StartingSize; - TRACE("("); dump_user_flags(pFlags); TRACE(", %d, %p\n", StartingSize, phGlobal); + TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, phGlobal); ALIGN_LENGTH(size, 3); @@ -340,7 +354,7 @@ ULONG __RPC_USER HGLOBAL_UserSize(ULONG unsigned char * __RPC_USER HGLOBAL_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HGLOBAL *phGlobal) { - TRACE("("); dump_user_flags(pFlags); TRACE(", %p, &%p\n", pBuffer, *phGlobal); + TRACE("(%s, %p, &%p\n", debugstr_user_flags(pFlags), pBuffer, *phGlobal); ALIGN_POINTER(pBuffer, 3); @@ -385,7 +399,7 @@ unsigned char * __RPC_USER HGLOBAL_UserU { ULONG fContext; - TRACE("("); dump_user_flags(pFlags); TRACE(", %p, &%p\n", pBuffer, *phGlobal); + TRACE("(%s, %p, &%p\n", debugstr_user_flags(pFlags), pBuffer, *phGlobal); ALIGN_POINTER(pBuffer, 3); @@ -451,7 +465,7 @@ unsigned char * __RPC_USER HGLOBAL_UserU */ void __RPC_USER HGLOBAL_UserFree(ULONG *pFlags, HGLOBAL *phGlobal) { - TRACE("("); dump_user_flags(pFlags); TRACE(", &%p\n", *phGlobal); + TRACE("(%s, &%p\n", debugstr_user_flags(pFlags), *phGlobal); if (LOWORD(*pFlags != MSHCTX_INPROC) && *phGlobal) GlobalFree(*phGlobal); @@ -531,7 +545,7 @@ ULONG __RPC_USER HENHMETAFILE_UserSize(U { ULONG size = StartingSize; - TRACE("("); dump_user_flags(pFlags); TRACE(", %d, %p\n", StartingSize, *phEmf); + TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, *phEmf); size += sizeof(ULONG); if (LOWORD(*pFlags) == MSHCTX_INPROC) @@ -555,7 +569,7 @@ ULONG __RPC_USER HENHMETAFILE_UserSize(U unsigned char * __RPC_USER HENHMETAFILE_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HENHMETAFILE *phEmf) { - TRACE("("); dump_user_flags(pFlags); TRACE(", %p, &%p\n", pBuffer, *phEmf); + TRACE("(%s, %p, &%p\n", debugstr_user_flags(pFlags), pBuffer, *phEmf); if (LOWORD(*pFlags) == MSHCTX_INPROC) { @@ -594,7 +608,7 @@ unsigned char * __RPC_USER HENHMETAFILE_ { ULONG fContext; - TRACE("("); dump_user_flags(pFlags); TRACE(", %p, %p\n", pBuffer, phEmf); + TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, phEmf); fContext = *(ULONG *)pBuffer; pBuffer += sizeof(ULONG); @@ -637,7 +651,7 @@ unsigned char * __RPC_USER HENHMETAFILE_ void __RPC_USER HENHMETAFILE_UserFree(ULONG *pFlags, HENHMETAFILE *phEmf) { - TRACE("("); dump_user_flags(pFlags); TRACE(", &%p\n", *phEmf); + TRACE("(%s, &%p\n", debugstr_user_flags(pFlags), *phEmf); if (LOWORD(*pFlags) != MSHCTX_INPROC) DeleteEnhMetaFile(*phEmf); @@ -647,7 +661,7 @@ ULONG __RPC_USER STGMEDIUM_UserSize(ULON { ULONG size = StartingSize; - TRACE("("); dump_user_flags(pFlags); TRACE(", %d, %p\n", StartingSize, pStgMedium); + TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, pStgMedium); ALIGN_LENGTH(size, 3); @@ -695,7 +709,7 @@ ULONG __RPC_USER STGMEDIUM_UserSize(ULON unsigned char * __RPC_USER STGMEDIUM_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, STGMEDIUM *pStgMedium) { - TRACE("("); dump_user_flags(pFlags); TRACE(", %p, %p\n", pBuffer, pStgMedium); + TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, pStgMedium); ALIGN_POINTER(pBuffer, 3); @@ -754,7 +768,7 @@ unsigned char * __RPC_USER STGMEDIUM_Use ALIGN_POINTER(pBuffer, 3); - TRACE("("); dump_user_flags(pFlags); TRACE(", %p, %p\n", pBuffer, pStgMedium); + TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, pStgMedium); pStgMedium->tymed = *(DWORD *)pBuffer; pBuffer += sizeof(DWORD); @@ -807,7 +821,7 @@ unsigned char * __RPC_USER STGMEDIUM_Use void __RPC_USER STGMEDIUM_UserFree(ULONG *pFlags, STGMEDIUM *pStgMedium) { - TRACE("("); dump_user_flags(pFlags); TRACE(", %p\n", pStgMedium); + TRACE("(%s, %p\n", debugstr_user_flags(pFlags), pStgMedium); ReleaseStgMedium(pStgMedium); }
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
72
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
Results per page:
10
25
50
100
200