[1/10] - [10/10] WineD3D

Stefan Dösinger stefan at codeweavers.com
Wed Feb 14 13:33:17 CST 2007


Am Mittwoch 14 Februar 2007 20:11 schrieb Mirek:
> Wow, great work!!!!! 3DMark 2006 with fbo looks realy coool!! And some
> Nvidia SDK demos are completly fixed!
Though I doubt that patch fixed it. You can do a regression test to find the 
patch that fixed it if you want, but last I tried to look for a fix I had to 
revert the sense of good and bad


> Mirek
>
> Stefan Dösinger napsal(a):
> > ------------------------------------------------------------------------
> >
> > From c59f7c4eea148cfb9a1321bbbbc587ef52194bc9 Mon Sep 17 00:00:00 2001
> > From: Stefan Doesinger <stefan at codeweavers.com>
> > Date: Fri, 2 Feb 2007 15:30:34 +0100
> > Subject: [PATCH] WineD3D: Properly release the converted vertex
> > declaration
> >
> > ---
> >  dlls/d3d9/d3d9_private.h      |    5 +++++
> >  dlls/d3d9/device.c            |    3 +++
> >  dlls/d3d9/vertexdeclaration.c |    5 +++++
> >  3 files changed, 13 insertions(+), 0 deletions(-)
> >
> > diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h
> > index 435a37e..972945d 100644
> > --- a/dlls/d3d9/d3d9_private.h
> > +++ b/dlls/d3d9/d3d9_private.h
> > @@ -179,6 +179,11 @@ typedef struct IDirect3DDevice9Impl
> >      /* Avoids recursion with nested ReleaseRef to 0 */
> >      BOOL                          inDestruction;
> >
> > +    /* A vertex declaration was converted from setFVF.
> > +     * Keep track of it, so it can be properly freed
> > +     */
> > +    IDirect3DVertexDeclaration9  *convertedDecl;
> > +
> >  } IDirect3DDevice9Impl;
> >
> >
> > diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
> > index 4eff550..e6ecd96 100644
> > --- a/dlls/d3d9/device.c
> > +++ b/dlls/d3d9/device.c
> > @@ -62,6 +62,8 @@ static ULONG WINAPI
> > IDirect3DDevice9Impl_Release(LPDIRECT3DDEVICE9 iface) {
> >
> >      if (ref == 0) {
> >        This->inDestruction = TRUE;
> > +      if (This->convertedDecl != NULL)
> > +          IUnknown_Release(This->convertedDecl);
> >        IWineD3DDevice_Uninit3D(This->WineD3DDevice,
> > D3D9CB_DestroyDepthStencilSurface, D3D9CB_DestroySwapChain);
> > IWineD3DDevice_Release(This->WineD3DDevice);
> >        HeapFree(GetProcessHeap(), 0, This);
> > @@ -766,6 +768,7 @@ HRESULT  WINAPI 
> > IDirect3DDevice9Impl_SetFVF(LPDIRECT3DDEVICE9 iface, DWORD FVF)
> >
> >           hr = IDirect3DDevice9Impl_SetVertexDeclaration(iface, pDecl);
> >           if (hr != S_OK) goto exit;
> > +         This->convertedDecl = pDecl;
> >           pDecl = NULL;
> >
> >           exit:
> > diff --git a/dlls/d3d9/vertexdeclaration.c
> > b/dlls/d3d9/vertexdeclaration.c index a7f5486..c3f462e 100644
> > --- a/dlls/d3d9/vertexdeclaration.c
> > +++ b/dlls/d3d9/vertexdeclaration.c
> > @@ -360,6 +360,11 @@ HRESULT  WINAPI 
> > IDirect3DDevice9Impl_SetVertexDeclaration(LPDIRECT3DDEVICE9 ifa
> >
> >      TRACE("(%p) : Relay\n", iface);
> >
> > +    if (This->convertedDecl && This->convertedDecl != pDecl) {
> > +        IUnknown_Release(This->convertedDecl);
> > +        This->convertedDecl = NULL;
> > +    }
> > +
> >      hr = IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice,
> > pDeclImpl == NULL ? NULL : pDeclImpl->wineD3DVertexDeclaration);
> >
> >      return hr;
> >
> >
> > ------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070214/bb0a6be0/attachment.pgp


More information about the wine-devel mailing list