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
October 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
1207 discussions
Start a n
N
ew thread
Rico Schüller : d3d10: Implement ID3D10EffectVariable: :AsDepthStencil().
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 48673eec293cb6d9816583fa8510e0cb0e7f492a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=48673eec293cb6d9816583fa8…
Author: Rico Schüller <kgbricola(a)web.de> Date: Tue Oct 27 20:12:53 2009 +0100 d3d10: Implement ID3D10EffectVariable::AsDepthStencil(). --- dlls/d3d10/effect.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 06c9973..b34df43 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -2642,9 +2642,14 @@ static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_variabl static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencil( ID3D10EffectVariable *iface) { - FIXME("iface %p stub!\n", iface); + struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface; - return NULL; + TRACE("iface %p\n", iface); + + if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl) + return (ID3D10EffectDepthStencilVariable *)This; + + return (ID3D10EffectDepthStencilVariable *)&null_depth_stencil_variable; } static struct ID3D10EffectRasterizerVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRasterizer(
1
0
0
0
Rico Schüller : d3d10: Implement ID3D10EffectVariable: :AsBlend().
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 53e00e12ba4d6a063bdccf523cf62444c04f4eb6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=53e00e12ba4d6a063bdccf523…
Author: Rico Schüller <kgbricola(a)web.de> Date: Tue Oct 27 20:12:29 2009 +0100 d3d10: Implement ID3D10EffectVariable::AsBlend(). --- dlls/d3d10/effect.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index acb0f23..06c9973 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -2629,9 +2629,14 @@ static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_variab static struct ID3D10EffectBlendVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsBlend(ID3D10EffectVariable *iface) { - FIXME("iface %p stub!\n", iface); + struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface; - return NULL; + TRACE("iface %p\n", iface); + + if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl) + return (ID3D10EffectBlendVariable *)This; + + return (ID3D10EffectBlendVariable *)&null_blend_variable; } static struct ID3D10EffectDepthStencilVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencil(
1
0
0
0
Rico Schüller : d3d10: Implement ID3D10EffectVariable: :AsConstantBuffer().
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: b1e56fae0118578836c41a06861f1d6a292bff92 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b1e56fae0118578836c41a068…
Author: Rico Schüller <kgbricola(a)web.de> Date: Tue Oct 27 20:12:11 2009 +0100 d3d10: Implement ID3D10EffectVariable::AsConstantBuffer(). --- dlls/d3d10/effect.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 36941da..acb0f23 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -2609,9 +2609,14 @@ static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_eff static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_variable_AsConstantBuffer( ID3D10EffectVariable *iface) { - FIXME("iface %p stub!\n", iface); + struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface; - return NULL; + TRACE("iface %p\n", iface); + + if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl) + return (ID3D10EffectConstantBuffer *)This; + + return (ID3D10EffectConstantBuffer *)&null_local_buffer; } static struct ID3D10EffectShaderVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShader(
1
0
0
0
Rico Schüller : d3d10: Implement ID3D10EffectVariable: :AsDepthStencilView().
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 7b91b36d93c57e239cb477b176f6a1251b428520 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7b91b36d93c57e239cb477b17…
Author: Rico Schüller <kgbricola(a)web.de> Date: Tue Oct 27 20:11:34 2009 +0100 d3d10: Implement ID3D10EffectVariable::AsDepthStencilView(). --- dlls/d3d10/effect.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index ca92f18..36941da 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -2596,9 +2596,14 @@ static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_eff static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencilView( ID3D10EffectVariable *iface) { - FIXME("iface %p stub!\n", iface); + struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface; - return NULL; + TRACE("iface %p\n", iface); + + if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl) + return (ID3D10EffectDepthStencilViewVariable *)This; + + return (ID3D10EffectDepthStencilViewVariable *)&null_depth_stencil_view_variable; } static struct ID3D10EffectConstantBuffer * STDMETHODCALLTYPE d3d10_effect_variable_AsConstantBuffer(
1
0
0
0
Rico Schüller : d3d10: Implement ID3D10EffectVariable: :AsRenderTargetView().
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 31383cad517b3a74b482c1eba00198b052675ca3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=31383cad517b3a74b482c1eba…
Author: Rico Schüller <kgbricola(a)web.de> Date: Tue Oct 27 20:11:06 2009 +0100 d3d10: Implement ID3D10EffectVariable::AsRenderTargetView(). --- dlls/d3d10/effect.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index c4391cf..ca92f18 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -2583,9 +2583,14 @@ static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effec static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRenderTargetView( ID3D10EffectVariable *iface) { - FIXME("iface %p stub!\n", iface); + struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface; - return NULL; + TRACE("iface %p\n", iface); + + if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl) + return (ID3D10EffectRenderTargetViewVariable *)This; + + return (ID3D10EffectRenderTargetViewVariable *)&null_render_target_view_variable; } static struct ID3D10EffectDepthStencilViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsDepthStencilView(
1
0
0
0
Rico Schüller : d3d10: Implement ID3D10EffectVariable: :AsShaderResource().
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: fee2d5320433ebf7784ca71560ddd1de5b693921 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fee2d5320433ebf7784ca7156…
Author: Rico Schüller <kgbricola(a)web.de> Date: Tue Oct 27 20:10:48 2009 +0100 d3d10: Implement ID3D10EffectVariable::AsShaderResource(). --- dlls/d3d10/effect.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index b52656b..c4391cf 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -2570,9 +2570,14 @@ static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_variab static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShaderResource( ID3D10EffectVariable *iface) { - FIXME("iface %p stub!\n", iface); + struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface; - return NULL; + TRACE("iface %p\n", iface); + + if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl) + return (ID3D10EffectShaderResourceVariable *)This; + + return (ID3D10EffectShaderResourceVariable *)&null_shader_resource_variable; } static struct ID3D10EffectRenderTargetViewVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsRenderTargetView(
1
0
0
0
Rico Schüller : d3d10: Implement ID3D10EffectVariable: :AsString().
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 2c3674d6ce75e3fb7669f1cbe0cb2756dfab348b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c3674d6ce75e3fb7669f1cbe…
Author: Rico Schüller <kgbricola(a)web.de> Date: Tue Oct 27 20:10:31 2009 +0100 d3d10: Implement ID3D10EffectVariable::AsString(). --- dlls/d3d10/effect.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index d4c7310..b52656b 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -2557,9 +2557,14 @@ static struct ID3D10EffectMatrixVariable * STDMETHODCALLTYPE d3d10_effect_variab static struct ID3D10EffectStringVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsString( ID3D10EffectVariable *iface) { - FIXME("iface %p stub!\n", iface); + struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface; - return NULL; + TRACE("iface %p\n", iface); + + if (This->vtbl == (ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl) + return (ID3D10EffectStringVariable *)This; + + return (ID3D10EffectStringVariable *)&null_string_variable; } static struct ID3D10EffectShaderResourceVariable * STDMETHODCALLTYPE d3d10_effect_variable_AsShaderResource(
1
0
0
0
Rico Schüller : d3d10: Fix a HeapFree() in d3d10_effect_Release().
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 607a643bcc3b38bce1dd4794ac7ec03140a218a7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=607a643bcc3b38bce1dd4794a…
Author: Rico Schüller <kgbricola(a)web.de> Date: Tue Oct 27 20:10:19 2009 +0100 d3d10: Fix a HeapFree() in d3d10_effect_Release(). --- dlls/d3d10/effect.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index ac3d972..d4c7310 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -1737,7 +1737,7 @@ static ULONG STDMETHODCALLTYPE d3d10_effect_Release(ID3D10Effect *iface) { d3d10_effect_variable_destroy(&This->local_variables[i]); } - HeapFree(GetProcessHeap(), 0, &This->local_variables); + HeapFree(GetProcessHeap(), 0, This->local_variables); } if (This->local_buffers)
1
0
0
0
Henri Verbeet : wined3d: Rename DestroyContext() to context_destroy().
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: e6ca176a482090f4688a98109334e026936c2b14 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6ca176a482090f4688a98109…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Oct 28 11:00:14 2009 +0100 wined3d: Rename DestroyContext() to context_destroy(). --- dlls/wined3d/context.c | 10 +++++----- dlls/wined3d/device.c | 9 +++++---- dlls/wined3d/swapchain.c | 6 +++--- dlls/wined3d/wined3d_private.h | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index deafe72..7dc7c0e 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1501,7 +1501,7 @@ out: * destroyed or unset. context is not a valid pointer after that call. * * Similar to the former call this isn't a performance critical function. A - * helper function for DestroyContext. + * helper function for context_destroy(). * * Params: * This: Device to activate the context for @@ -1556,16 +1556,16 @@ static void RemoveContextFromArray(IWineD3DDeviceImpl *This, struct wined3d_cont } /***************************************************************************** - * DestroyContext + * context_destroy * - * Destroys a wineD3DContext + * Destroys a wined3d context * * Params: * This: Device to activate the context for * context: Context to destroy * *****************************************************************************/ -void DestroyContext(IWineD3DDeviceImpl *This, struct wined3d_context *context) +void context_destroy(IWineD3DDeviceImpl *This, struct wined3d_context *context) { BOOL destroy; @@ -1904,7 +1904,7 @@ retry: || This->pbufferWidth < targetimpl->currentDesc.Width || This->pbufferHeight < targetimpl->currentDesc.Height) { - if (This->pbufferContext) DestroyContext(This, This->pbufferContext); + if (This->pbufferContext) context_destroy(This, This->pbufferContext); /* The display is irrelevant here, the window is 0. But * context_create() needs a valid X connection. Create the context diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7f03adb..66ccc15 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1307,7 +1307,7 @@ error: if(object->context && object->context[0]) { context_release(object->context[0]); - DestroyContext(This, object->context[0]); + context_destroy(This, object->context[0]); } if (object->frontBuffer) IWineD3DSurface_Release(object->frontBuffer); HeapFree(GetProcessHeap(), 0, object); @@ -2011,7 +2011,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, } /* Delete the pbuffer context if there is any */ - if(This->pbufferContext) DestroyContext(This, This->pbufferContext); + if(This->pbufferContext) context_destroy(This, This->pbufferContext); /* Delete the mouse cursor texture */ if(This->cursorTexture) { @@ -6658,8 +6658,9 @@ void delete_opengl_contexts(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain_ context_release(context); - while(This->numContexts) { - DestroyContext(This, This->contexts[0]); + while (This->numContexts) + { + context_destroy(This, This->contexts[0]); } HeapFree(GetProcessHeap(), 0, swapchain->context); swapchain->context = NULL; diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 456440b..cab916b 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -76,7 +76,7 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface) for (i = 0; i < This->num_contexts; ++i) { - DestroyContext(This->wineD3DDevice, This->context[i]); + context_destroy(This->wineD3DDevice, This->context[i]); } /* Restore the screen resolution if we rendered in fullscreen * This will restore the screen resolution to what it was before creating the swapchain. In case of d3d8 and d3d9 @@ -354,7 +354,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_SetDestWindowOverride(IWineD3DSwapCh memcpy(mem, r.pBits, r.Pitch * ((IWineD3DSurfaceImpl *) This->backBuffer[0])->currentDesc.Height); IWineD3DSurface_UnlockRect(This->backBuffer[0]); - DestroyContext(This->wineD3DDevice, This->context[0]); + context_destroy(This->wineD3DDevice, This->context[0]); This->context[0] = context_create(This->wineD3DDevice, (IWineD3DSurfaceImpl *)This->frontBuffer, This->win_handle, FALSE /* pbuffer */, &This->presentParms); context_release(This->context[0]); @@ -408,7 +408,7 @@ struct wined3d_context *swapchain_create_context_for_thread(IWineD3DSwapChain *i newArray = HeapAlloc(GetProcessHeap(), 0, sizeof(*newArray) * This->num_contexts + 1); if(!newArray) { ERR("Out of memory when trying to allocate a new context array\n"); - DestroyContext(This->wineD3DDevice, ctx); + context_destroy(This->wineD3DDevice, ctx); return NULL; } memcpy(newArray, This->context, sizeof(*newArray) * This->num_contexts); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d8f65b0..3c1e631 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1164,7 +1164,6 @@ typedef enum ContextUsage { CTXUSAGE_CLEAR = 4, /* Drawable and states are set up for clearing */ } ContextUsage; -void DestroyContext(IWineD3DDeviceImpl *This, struct wined3d_context *context) DECLSPEC_HIDDEN; struct wined3d_context *context_acquire(IWineD3DDeviceImpl *This, IWineD3DSurface *target, enum ContextUsage usage) DECLSPEC_HIDDEN; void context_alloc_event_query(struct wined3d_context *context, @@ -1180,6 +1179,7 @@ void context_attach_surface_fbo(const struct wined3d_context *context, GLenum fbo_target, DWORD idx, IWineD3DSurface *surface) DECLSPEC_HIDDEN; struct wined3d_context *context_create(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, HWND win, BOOL create_pbuffer, const WINED3DPRESENT_PARAMETERS *present_parameters) DECLSPEC_HIDDEN; +void context_destroy(IWineD3DDeviceImpl *This, struct wined3d_context *context) DECLSPEC_HIDDEN; void context_free_event_query(struct wined3d_event_query *query) DECLSPEC_HIDDEN; void context_free_occlusion_query(struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN; struct wined3d_context *context_get_current(void) DECLSPEC_HIDDEN;
1
0
0
0
Henri Verbeet : wined3d: Restore the thread's GL context on context_release () if it wasn't created by wined3d.
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: c0050b8ec91b60d6d6a646095cc22f9856eafeda URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c0050b8ec91b60d6d6a646095…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Oct 28 11:00:13 2009 +0100 wined3d: Restore the thread's GL context on context_release() if it wasn't created by wined3d. The background on this is that some applications use OpenGL and DirectDraw/Direct3D on the same thread, typically using OpenGL for rendering and DirectDraw to get the amount of available video memory. This means that we might replace the application's current GL context with one with a completely different state, but also that our current GL context might not be what we think it is. --- dlls/wined3d/context.c | 50 +++++++++++++++++++++++++++++++++++---- dlls/wined3d/wined3d_private.h | 2 + 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 1362352..deafe72 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -843,7 +843,37 @@ void context_release(struct wined3d_context *context) WARN("Context %p is not the current context.\n", context); } - --context->level; + if (!--context->level && context->restore_ctx) + { + TRACE("Restoring GL context %p on device context %p.\n", context->restore_ctx, context->restore_dc); + if (!pwglMakeCurrent(context->restore_dc, context->restore_ctx)) + { + DWORD err = GetLastError(); + ERR("Failed to restore GL context %p on device context %p, last error %#x.\n", + context->restore_ctx, context->restore_dc, err); + } + context->restore_ctx = NULL; + context->restore_dc = NULL; + } +} + +static void context_enter(struct wined3d_context *context) +{ + TRACE("Entering context %p, level %u.\n", context, context->level + 1); + + if (!context->level++) + { + const struct wined3d_context *current_context = context_get_current(); + HGLRC current_gl = pwglGetCurrentContext(); + + if (current_gl && (!current_context || current_context->glCtx != current_gl)) + { + TRACE("Another GL context (%p on device context %p) is already current.\n", + current_gl, pwglGetCurrentDC()); + context->restore_ctx = current_gl; + context->restore_dc = pwglGetCurrentDC(); + } + } } /***************************************************************************** @@ -1347,10 +1377,13 @@ struct wined3d_context *context_create(IWineD3DDeviceImpl *This, IWineD3DSurface list_init(&ret->fbo_list); list_init(&ret->fbo_destroy_list); + context_enter(ret); + /* Set up the context defaults */ if (!context_set_current(ret)) { ERR("Cannot activate context to set up defaults\n"); + context_release(ret); goto out; } @@ -1447,8 +1480,6 @@ struct wined3d_context *context_create(IWineD3DDeviceImpl *This, IWineD3DSurface This->frag_pipe->enable_extension((IWineD3DDevice *) This, TRUE); - ++ret->level; - return ret; out: @@ -2078,9 +2109,7 @@ struct wined3d_context *context_acquire(IWineD3DDeviceImpl *This, IWineD3DSurfac TRACE("(%p): Selecting context for render target %p, thread %d\n", This, target, tid); context = FindContext(This, target, tid); - ++context->level; - TRACE("Found context %p, level %u.\n", context, context->level); - + context_enter(context); if (!context->valid) return context; gl_info = context->gl_info; @@ -2104,6 +2133,15 @@ struct wined3d_context *context_acquire(IWineD3DDeviceImpl *This, IWineD3DSurfac This->highest_dirty_ps_const = This->d3d_pshader_constantF; } } + else if (context->restore_ctx) + { + if (!pwglMakeCurrent(context->hdc, context->glCtx)) + { + DWORD err = GetLastError(); + ERR("Failed to make GL context %p current on device context %p, last error %#x.\n", + context->hdc, context->glCtx, err); + } + } switch (usage) { case CTXUSAGE_CLEAR: diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0617bbc..d8f65b0 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1060,6 +1060,8 @@ struct wined3d_context /* The actual opengl context */ UINT level; + HGLRC restore_ctx; + HDC restore_dc; HGLRC glCtx; HWND win_handle; HDC hdc;
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
121
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
Results per page:
10
25
50
100
200