X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=dll%2Fdirectx%2Fwine%2Fwined3d%2Fvertexdeclaration.c;h=0bc141acd8c009ca84a37388a9a0f19e02ae26f3;hp=db595be82ad0afd08970d41ea95378dfbbe0bb0f;hb=e4a060ead45b9dc87a64408b6d791ea4a5fef55e;hpb=2597cfe258b768473a744df30227f4067252d9b7 diff --git a/dll/directx/wine/wined3d/vertexdeclaration.c b/dll/directx/wine/wined3d/vertexdeclaration.c index db595be82ad..0bc141acd8c 100644 --- a/dll/directx/wine/wined3d/vertexdeclaration.c +++ b/dll/directx/wine/wined3d/vertexdeclaration.c @@ -27,8 +27,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_decl); -#define GLINFO_LOCATION This->wineD3DDevice->adapter->gl_info - static void dump_wined3dvertexelement(const WINED3DVERTEXELEMENT *element) { TRACE(" format: %s (%#x)\n", debug_d3dformat(element->format), element->format); TRACE(" input_slot: %u\n", element->input_slot); @@ -68,12 +66,8 @@ static ULONG WINAPI IWineD3DVertexDeclarationImpl_Release(IWineD3DVertexDeclarat ULONG ref; TRACE("(%p) : Releasing from %d\n", This, This->ref); ref = InterlockedDecrement(&This->ref); - if (ref == 0) { - if(iface == This->wineD3DDevice->stateBlock->vertexDecl) { - /* See comment in PixelShader::Release */ - IWineD3DDeviceImpl_MarkStateDirty(This->wineD3DDevice, STATE_VDECL); - } - + if (!ref) + { HeapFree(GetProcessHeap(), 0, This->elements); This->parent_ops->wined3d_object_destroyed(This->parent); HeapFree(GetProcessHeap(), 0, This); @@ -94,16 +88,6 @@ static HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetParent(IWineD3DVertexDecl return WINED3D_OK; } -static HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDevice(IWineD3DVertexDeclaration *iface, IWineD3DDevice** ppDevice) { - IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface; - TRACE("(%p) : returning %p\n", This, This->wineD3DDevice); - - *ppDevice = (IWineD3DDevice *) This->wineD3DDevice; - IWineD3DDevice_AddRef(*ppDevice); - - return WINED3D_OK; -} - static BOOL declaration_element_valid_ffp(const WINED3DVERTEXELEMENT *element) { switch(element->usage) @@ -200,7 +184,6 @@ static const IWineD3DVertexDeclarationVtbl IWineD3DVertexDeclaration_Vtbl = IWineD3DVertexDeclarationImpl_Release, /* IWineD3DVertexDeclaration */ IWineD3DVertexDeclarationImpl_GetParent, - IWineD3DVertexDeclarationImpl_GetDevice, }; HRESULT vertexdeclaration_init(IWineD3DVertexDeclarationImpl *declaration, IWineD3DDeviceImpl *device, @@ -223,7 +206,7 @@ HRESULT vertexdeclaration_init(IWineD3DVertexDeclarationImpl *declaration, IWine declaration->ref = 1; declaration->parent = parent; declaration->parent_ops = parent_ops; - declaration->wineD3DDevice = device; + declaration->device = device; declaration->elements = HeapAlloc(GetProcessHeap(), 0, sizeof(*declaration->elements) * element_count); if (!declaration->elements) {