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
Henri Verbeet : wined3d: Let the context handle the draw buffer in swapchain_blit().
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 6bf79b885fcac151d903aefb7a59345d0fcad98b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6bf79b885fcac151d903aefb7…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Dec 13 22:04:01 2009 +0100 wined3d: Let the context handle the draw buffer in swapchain_blit(). --- dlls/wined3d/swapchain.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 3e4da78..c960ace 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -118,7 +118,7 @@ static inline void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_co context_attach_depth_stencil_fbo(context, GL_READ_FRAMEBUFFER, NULL, FALSE); context_bind_fbo(context, GL_DRAW_FRAMEBUFFER, NULL); - glDrawBuffer(GL_BACK); + context_set_draw_buffer(context, GL_BACK); glDisable(GL_SCISSOR_TEST); IWineD3DDeviceImpl_MarkStateDirty(This->device, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE)); @@ -160,7 +160,7 @@ static inline void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_co glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glDrawBuffer(GL_BACK); + context_set_draw_buffer(context, GL_BACK); /* Set the viewport to the destination rectandle, disable any projection * transformation set up by CTXUSAGE_BLIT, and draw a (-1,-1)-(1,1) quad.
1
0
0
0
Henri Verbeet : wined3d: Let the context handle the draw buffer in fb_copy_to_texture_hwstretch().
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 82556b613eb1929e4010b4d7d89fb527b9d9ab15 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=82556b613eb1929e4010b4d7d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Dec 13 22:04:00 2009 +0100 wined3d: Let the context handle the draw buffer in fb_copy_to_texture_hwstretch(). --- dlls/wined3d/surface.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 6c8bb36..59dda6e 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3320,7 +3320,7 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine glTexParameteri(texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP); - glDrawBuffer(drawBuffer); + context_set_draw_buffer(context, drawBuffer); glReadBuffer(drawBuffer); glBegin(GL_QUADS); @@ -3397,9 +3397,6 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine glTexCoord2f((float) fbwidth / (float) Src->pow2Width, (float) fbheight / (float) Src->pow2Height); glVertex2i(fbwidth, 0); glEnd(); - } else { - /* Restore the old draw buffer */ - glDrawBuffer(GL_BACK); } glDisable(texture_target); checkGLcall("glDisable(texture_target)");
1
0
0
0
Henri Verbeet : wined3d: Let the context handle the draw buffer in flush_to_framebuffer_drawpixels( ).
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 59db3ecaa09f99b417d827290eef3cd97413070c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=59db3ecaa09f99b417d827290…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Dec 13 22:03:59 2009 +0100 wined3d: Let the context handle the draw buffer in flush_to_framebuffer_drawpixels(). --- dlls/wined3d/surface.c | 27 +++++++-------------------- 1 files changed, 7 insertions(+), 20 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 3d2a337..6c8bb36 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1435,16 +1435,15 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This, GLenum fm if (SUCCEEDED(IWineD3DSurface_GetContainer((IWineD3DSurface *)This, &IID_IWineD3DSwapChain, (void **)&swapchain))) { GLenum buffer = surface_get_gl_buffer((IWineD3DSurface *) This, (IWineD3DSwapChain *)swapchain); - TRACE("Unlocking %#x buffer\n", buffer); - glDrawBuffer(buffer); - checkGLcall("glDrawBuffer"); - IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain); - } else { + TRACE("Unlocking %#x buffer.\n", buffer); + context_set_draw_buffer(context, buffer); + } + else + { /* Primary offscreen render target */ - TRACE("Offscreen render target\n"); - glDrawBuffer(myDevice->offscreenBuffer); - checkGLcall("glDrawBuffer(myDevice->offscreenBuffer)"); + TRACE("Offscreen render target.\n"); + context_set_draw_buffer(context, myDevice->offscreenBuffer); } glGetIntegerv(GL_PACK_SWAP_BYTES, &prev_store); @@ -1511,20 +1510,8 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This, GLenum fm glPixelStorei(GL_UNPACK_ROW_LENGTH, skipBytes); checkGLcall("glPixelStorei(GL_UNPACK_ROW_LENGTH)"); - if(!swapchain) { - glDrawBuffer(myDevice->offscreenBuffer); - checkGLcall("glDrawBuffer(myDevice->offscreenBuffer)"); - } else if(swapchain->backBuffer) { - glDrawBuffer(GL_BACK); - checkGLcall("glDrawBuffer(GL_BACK)"); - } else { - glDrawBuffer(GL_FRONT); - checkGLcall("glDrawBuffer(GL_FRONT)"); - } LEAVE_GL(); context_release(context); - - return; } static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
1
0
0
0
Henri Verbeet : wined3d: Let the context handle the draw buffer in stretch_rect_fbo().
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 30f5883ef56c3d700ddb5ba7adc60a41cb559ee4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=30f5883ef56c3d700ddb5ba7a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Dec 13 22:03:58 2009 +0100 wined3d: Let the context handle the draw buffer in stretch_rect_fbo(). --- dlls/wined3d/device.c | 21 +++++++-------------- 1 files changed, 7 insertions(+), 14 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 6529b23..c71d4eb 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5775,16 +5775,16 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED ENTER_GL(); context_bind_fbo(context, GL_DRAW_FRAMEBUFFER, NULL); - glDrawBuffer(buffer); - checkGLcall("glDrawBuffer()"); - } else { + context_set_draw_buffer(context, buffer); + } + else + { TRACE("Destination surface %p is offscreen\n", dst_surface); ENTER_GL(); context_bind_fbo(context, GL_DRAW_FRAMEBUFFER, &context->dst_fbo); context_attach_surface_fbo(context, GL_DRAW_FRAMEBUFFER, 0, dst_surface); - glDrawBuffer(GL_COLOR_ATTACHMENT0); - checkGLcall("glDrawBuffer()"); + context_set_draw_buffer(context, GL_COLOR_ATTACHMENT0); context_attach_depth_stencil_fbo(context, GL_DRAW_FRAMEBUFFER, NULL, FALSE); } glDisable(GL_SCISSOR_TEST); @@ -5800,17 +5800,10 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED checkGLcall("glBlitFramebuffer()"); } - IWineD3DSurface_ModifyLocation(dst_surface, SFLAG_INDRAWABLE, TRUE); - - /* If we switched from GL_BACK to GL_FRONT above, we need to switch back here */ - if (dst_swapchain && dst_surface == ((IWineD3DSwapChainImpl *)dst_swapchain)->frontBuffer - && ((IWineD3DSwapChainImpl *)dst_swapchain)->backBuffer) { - glDrawBuffer(GL_BACK); - checkGLcall("glDrawBuffer()"); - } LEAVE_GL(); - context_release(context); + + IWineD3DSurface_ModifyLocation(dst_surface, SFLAG_INDRAWABLE, TRUE); } static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface, DWORD RenderTargetIndex, IWineD3DSurface *pRenderTarget,
1
0
0
0
Henri Verbeet : d3d10core: Add a stub ID3D10Query implementation.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: e4e1c279870b6b7f696a70ef7d4d0c27060ab15f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4e1c279870b6b7f696a70ef7…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Dec 13 22:03:57 2009 +0100 d3d10core: Add a stub ID3D10Query implementation. --- dlls/d3d10core/Makefile.in | 1 + dlls/d3d10core/async.c | 166 ++++++++++++++++++++++++++++++++++++ dlls/d3d10core/d3d10core_private.h | 9 ++ dlls/d3d10core/device.c | 25 +++++- 4 files changed, 199 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10core/Makefile.in b/dlls/d3d10core/Makefile.in index fe61293..935e83f 100644 --- a/dlls/d3d10core/Makefile.in +++ b/dlls/d3d10core/Makefile.in @@ -7,6 +7,7 @@ IMPORTLIB = d3d10core IMPORTS = dxguid uuid dxgi kernel32 C_SRCS = \ + async.c \ buffer.c \ d3d10core_main.c \ device.c \ diff --git a/dlls/d3d10core/async.c b/dlls/d3d10core/async.c new file mode 100644 index 0000000..4efde85 --- /dev/null +++ b/dlls/d3d10core/async.c @@ -0,0 +1,166 @@ +/* + * Copyright 2009 Henri Verbeet for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "config.h" +#include "wine/port.h" + +#include "d3d10core_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3d10core); + +/* IUnknown methods */ + +static HRESULT STDMETHODCALLTYPE d3d10_query_QueryInterface(ID3D10Query *iface, REFIID riid, void **object) +{ + TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_ID3D10Query) + || IsEqualGUID(riid, &IID_ID3D10Asynchronous) + || IsEqualGUID(riid, &IID_ID3D10DeviceChild) + || IsEqualGUID(riid, &IID_IUnknown)) + { + IUnknown_AddRef(iface); + *object = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); + + *object = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE d3d10_query_AddRef(ID3D10Query *iface) +{ + struct d3d10_query *This = (struct d3d10_query *)iface; + ULONG refcount = InterlockedIncrement(&This->refcount); + + TRACE("%p increasing refcount to %u.\n", This, refcount); + + return refcount; +} + +static ULONG STDMETHODCALLTYPE d3d10_query_Release(ID3D10Query *iface) +{ + struct d3d10_query *This = (struct d3d10_query *)iface; + ULONG refcount = InterlockedDecrement(&This->refcount); + + TRACE("%p decreasing refcount to %u.\n", This, refcount); + + if (!refcount) + { + HeapFree(GetProcessHeap(), 0, This); + } + + return refcount; +} + +/* ID3D10DeviceChild methods */ + +static void STDMETHODCALLTYPE d3d10_query_GetDevice(ID3D10Query *iface, ID3D10Device **device) +{ + FIXME("iface %p, device %p stub!\n", iface, device); +} + +static HRESULT STDMETHODCALLTYPE d3d10_query_GetPrivateData(ID3D10Query *iface, + REFGUID guid, UINT *data_size, void *data) +{ + FIXME("iface %p, guid %s, data_size %p, data %p stub!\n", + iface, debugstr_guid(guid), data_size, data); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d10_query_SetPrivateData(ID3D10Query *iface, + REFGUID guid, UINT data_size, const void *data) +{ + FIXME("iface %p, guid %s, data_size %u, data %p stub!\n", + iface, debugstr_guid(guid), data_size, data); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d10_query_SetPrivateDataInterface(ID3D10Query *iface, + REFGUID guid, const IUnknown *data) +{ + FIXME("iface %p, guid %s, data %p stub!\n", iface, debugstr_guid(guid), data); + + return E_NOTIMPL; +} + +/* ID3D10Asynchronous methods */ + +static void STDMETHODCALLTYPE d3d10_query_Begin(ID3D10Query *iface) +{ + FIXME("iface %p stub!\n", iface); +} + +static void STDMETHODCALLTYPE d3d10_query_End(ID3D10Query *iface) +{ + FIXME("iface %p stub!\n", iface); +} + +static HRESULT STDMETHODCALLTYPE d3d10_query_GetData(ID3D10Query *iface, void *data, UINT data_size, UINT flags) +{ + FIXME("iface %p, data %p, data_size %u, flags %#x stub!\n", iface, data, data_size, flags); + + return E_NOTIMPL; +} + +static UINT STDMETHODCALLTYPE d3d10_query_GetDataSize(ID3D10Query *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + +/* ID3D10Query methods */ + +static void STDMETHODCALLTYPE d3d10_query_GetDesc(ID3D10Query *iface, D3D10_QUERY_DESC *desc) +{ + FIXME("iface %p, desc %p stub!\n", iface, desc); +} + +static const struct ID3D10QueryVtbl d3d10_query_vtbl = +{ + /* IUnknown methods */ + d3d10_query_QueryInterface, + d3d10_query_AddRef, + d3d10_query_Release, + /* ID3D10DeviceChild methods */ + d3d10_query_GetDevice, + d3d10_query_GetPrivateData, + d3d10_query_SetPrivateData, + d3d10_query_SetPrivateDataInterface, + /* ID3D10Asynchronous methods */ + d3d10_query_Begin, + d3d10_query_End, + d3d10_query_GetData, + d3d10_query_GetDataSize, + /* ID3D10Query methods */ + d3d10_query_GetDesc, +}; + +HRESULT d3d10_query_init(struct d3d10_query *query) +{ + query->vtbl = &d3d10_query_vtbl; + query->refcount = 1; + + return S_OK; +} diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index cc3029f..058d8dc 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -224,6 +224,15 @@ struct d3d10_sampler_state HRESULT d3d10_sampler_state_init(struct d3d10_sampler_state *state) DECLSPEC_HIDDEN; +/* ID3D10Query */ +struct d3d10_query +{ + const struct ID3D10QueryVtbl *vtbl; + LONG refcount; +}; + +HRESULT d3d10_query_init(struct d3d10_query *query) DECLSPEC_HIDDEN; + /* Layered device */ enum dxgi_device_layer_id { diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index cfc7dec..39be2ef 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -1036,9 +1036,30 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateSamplerState(ID3D10Device *i static HRESULT STDMETHODCALLTYPE d3d10_device_CreateQuery(ID3D10Device *iface, const D3D10_QUERY_DESC *desc, ID3D10Query **query) { - FIXME("iface %p, desc %p, query %p stub!\n", iface, desc, query); + struct d3d10_query *object; + HRESULT hr; - return E_NOTIMPL; + TRACE("iface %p, desc %p, query %p.\n", iface, desc, query); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate D3D10 query object memory.\n"); + return E_OUTOFMEMORY; + } + + hr = d3d10_query_init(object); + if (FAILED(hr)) + { + WARN("Failed to initialize query, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created query %p.\n", object); + *query = (ID3D10Query *)object; + + return S_OK; } static HRESULT STDMETHODCALLTYPE d3d10_device_CreatePredicate(ID3D10Device *iface,
1
0
0
0
Rob Shearman : rpcrt4: Handle [out] -only non-conformant strings in stubless servers.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: d412bcc3aef1ccec410b82fac74e4e55897d9438 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d412bcc3aef1ccec410b82fac…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Sun Dec 13 19:47:55 2009 +0000 rpcrt4: Handle [out]-only non-conformant strings in stubless servers. --- dlls/rpcrt4/ndr_stubless.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index 2028fed..5a66c25 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -999,6 +999,18 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat) size = ComplexStructSize(pStubMsg, pFormat); size *= pStubMsg->MaxCount; break; + case RPC_FC_C_CSTRING: + case RPC_FC_C_WSTRING: + if (*pFormat == RPC_FC_C_CSTRING) + size = sizeof(CHAR); + else + size = sizeof(WCHAR); + if (pFormat[1] == RPC_FC_STRING_SIZED) + ComputeConformance(pStubMsg, NULL, pFormat + 2, 0); + else + pStubMsg->MaxCount = 0; + size *= pStubMsg->MaxCount; + break; default: FIXME("Unhandled type %02x\n", *pFormat); /* fallthrough */
1
0
0
0
Rob Shearman : rpcrt4: Add support for context handles in stubless servers.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: b24aa1c153281d7b25a107b52e8052fdbbca99e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b24aa1c153281d7b25a107b52…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Sun Dec 13 19:47:35 2009 +0000 rpcrt4: Add support for context handles in stubless servers. --- dlls/rpcrt4/ndr_marshall.c | 38 +++++++++++++++++++++++++++++++------- dlls/rpcrt4/ndr_stubless.c | 22 ++++++++++++++++------ 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 4511164..4c9f625 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -39,6 +39,7 @@ #include "ndr_misc.h" #include "rpcndr.h" +#include "ndrtypes.h" #include "wine/unicode.h" #include "wine/rpcfc.h" @@ -113,6 +114,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); #define NDR_TABLE_SIZE 128 #define NDR_TABLE_MASK 127 +#define NDRSContextFromValue(user_context) (NDR_SCONTEXT)((char *)(user_context) - (char *)NDRSContextValue((NDR_SCONTEXT)NULL)) + static unsigned char *WINAPI NdrBaseTypeMarshall(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING); static unsigned char *WINAPI NdrBaseTypeUnmarshall(PMIDL_STUB_MESSAGE, unsigned char **, PFORMAT_STRING, unsigned char); static void WINAPI NdrBaseTypeBufferSize(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING); @@ -6687,10 +6690,19 @@ static unsigned char *WINAPI NdrContextHandleMarshall( } TRACE("flags: 0x%02x\n", pFormat[1]); - if (pFormat[1] & 0x80) - NdrClientContextMarshall(pStubMsg, *(NDR_CCONTEXT **)pMemory, FALSE); + if (pStubMsg->IsClient) + { + if (pFormat[1] & HANDLE_PARAM_IS_VIA_PTR) + NdrClientContextMarshall(pStubMsg, *(NDR_CCONTEXT **)pMemory, FALSE); + else + NdrClientContextMarshall(pStubMsg, pMemory, FALSE); + } else - NdrClientContextMarshall(pStubMsg, pMemory, FALSE); + { + NDR_SCONTEXT ctxt = NDRSContextFromValue(pMemory); + NDR_RUNDOWN rundown = pStubMsg->StubDesc->apfnNdrRundownRoutines[pFormat[2]]; + NdrServerContextNewMarshall(pStubMsg, ctxt, rundown, pFormat); + } return NULL; } @@ -6714,10 +6726,22 @@ static unsigned char *WINAPI NdrContextHandleUnmarshall( } TRACE("flags: 0x%02x\n", pFormat[1]); - /* [out]-only or [ret] param */ - if ((pFormat[1] & 0x60) == 0x20) - **(NDR_CCONTEXT **)ppMemory = NULL; - NdrClientContextUnmarshall(pStubMsg, *(NDR_CCONTEXT **)ppMemory, pStubMsg->RpcMsg->Handle); + if (pStubMsg->IsClient) + { + /* [out]-only or [ret] param */ + if ((pFormat[1] & (HANDLE_PARAM_IS_IN|HANDLE_PARAM_IS_OUT)) == HANDLE_PARAM_IS_OUT) + **(NDR_CCONTEXT **)ppMemory = NULL; + NdrClientContextUnmarshall(pStubMsg, *(NDR_CCONTEXT **)ppMemory, pStubMsg->RpcMsg->Handle); + } + else + { + NDR_SCONTEXT ctxt; + ctxt = NdrServerContextNewUnmarshall(pStubMsg, pFormat); + if (pFormat[1] & HANDLE_PARAM_IS_VIA_PTR) + *(void **)ppMemory = NDRSContextValue(ctxt); + else + *(void **)ppMemory = *NDRSContextValue(ctxt); + } return NULL; } diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index bf6a7be..2028fed 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -1128,7 +1128,8 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg, !pParam->param_attributes.IsByValue && !pParam->param_attributes.ServerAllocSize) { - pStubMsg->pfnFree(*(void **)pArg); + if (*pTypeFormat != RPC_FC_BIND_CONTEXT) + pStubMsg->pfnFree(*(void **)pArg); } if (pParam->param_attributes.ServerAllocSize) @@ -1140,12 +1141,21 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg, !pParam->param_attributes.ServerAllocSize && !pParam->param_attributes.IsByValue) { - DWORD size = calc_arg_size(pStubMsg, pTypeFormat); - - if(size) + if (*pTypeFormat == RPC_FC_BIND_CONTEXT) { - *(void **)pArg = NdrAllocate(pStubMsg, size); - memset(*(void **)pArg, 0, size); + NDR_SCONTEXT ctxt = NdrContextHandleInitialize( + pStubMsg, pTypeFormat); + *(void **)pArg = NDRSContextValue(ctxt); + } + else + { + DWORD size = calc_arg_size(pStubMsg, pTypeFormat); + + if(size) + { + *(void **)pArg = NdrAllocate(pStubMsg, size); + memset(*(void **)pArg, 0, size); + } } } break;
1
0
0
0
Rob Shearman : rpcrt4: Fix some memory leaks in the cstub tests.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 15cd36d21d8f8cea09f45b35293e1b02f887c8ea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=15cd36d21d8f8cea09f45b352…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Sun Dec 13 19:46:13 2009 +0000 rpcrt4: Fix some memory leaks in the cstub tests. --- dlls/rpcrt4/tests/cstub.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/tests/cstub.c b/dlls/rpcrt4/tests/cstub.c index ca871b7..93a7fe3 100644 --- a/dlls/rpcrt4/tests/cstub.c +++ b/dlls/rpcrt4/tests/cstub.c @@ -770,6 +770,8 @@ static void test_CreateStub(IPSFactoryBuffer *ppsf) /* 0xdeadbeef returned from create_stub_test_QI */ ok(cstd_stub->pvServerObject == (void*)0xdeadbeef, "pvServerObject %p\n", cstd_stub->pvServerObject); ok(cstd_stub->pPSFactory != NULL, "pPSFactory was NULL\n"); + cstd_stub->pvServerObject = NULL; + IRpcStubBuffer_Release(pstub); vtbl = &create_stub_test_fail_vtbl; pstub = create_stub(ppsf, &IID_if1, obj, E_NOINTERFACE); @@ -908,6 +910,7 @@ static void test_Disconnect(IPSFactoryBuffer *ppsf) IRpcStubBuffer_Disconnect(pstub); ok(connect_test_orig_release_called == 1, "release called %d\n", connect_test_orig_release_called); ok(cstd_stub->pvServerObject == NULL, "pvServerObject %p\n", cstd_stub->pvServerObject); + IRpcStubBuffer_Release(pstub); }
1
0
0
0
Rob Shearman : secur32: Fix memory leak in NTLM's FreeCredentialsHandle.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 3cd88cfab396a10dfbe5516b48e4c851f4eb6dc9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3cd88cfab396a10dfbe5516b4…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Sun Dec 13 19:45:38 2009 +0000 secur32: Fix memory leak in NTLM's FreeCredentialsHandle. --- dlls/secur32/ntlm.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c index 79f55e7..74fb2db 100644 --- a/dlls/secur32/ntlm.c +++ b/dlls/secur32/ntlm.c @@ -1721,6 +1721,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_FreeCredentialsHandle( HeapFree(GetProcessHeap(), 0, ntlm_cred->password); HeapFree(GetProcessHeap(), 0, ntlm_cred->username_arg); HeapFree(GetProcessHeap(), 0, ntlm_cred->domain_arg); + HeapFree(GetProcessHeap(), 0, ntlm_cred); ret = SEC_E_OK; } else
1
0
0
0
Huw Davies : riched20: Fix a memory leak.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: d88c47fccb5b40cd5e5e50fb0adf752d272cb5a2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d88c47fccb5b40cd5e5e50fb0…
Author: Huw Davies <huw(a)codeweavers.com> Date: Sun Dec 13 14:58:43 2009 +0000 riched20: Fix a memory leak. Found by Valgrind. --- dlls/riched20/editor.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 4bc901e..6790a6a 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3283,6 +3283,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, wszText = lParam ? ME_ToUnicode(bUnicode, (void *)lParam) : NULL; len = wszText ? lstrlenW(wszText) : 0; ME_InsertTextFromCursor(editor, 0, wszText, len, style); + ME_EndToUnicode(bUnicode, wszText); } if (bSelection) {
1
0
0
0
← Newer
1
...
63
64
65
66
67
68
69
...
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