Stefan Dösinger : wined3d: Do not keep internal references to the vertex declaration.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jan 8 14:44:10 CST 2007
Module: wine
Branch: master
Commit: 15f91b4ad3b20f28f304b0e9b4caa0bd64eaae31
URL: http://source.winehq.org/git/wine.git/?a=commit;h=15f91b4ad3b20f28f304b0e9b4caa0bd64eaae31
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Sat Jan 6 18:24:47 2007 +0100
wined3d: Do not keep internal references to the vertex declaration.
---
dlls/wined3d/device.c | 6 ------
dlls/wined3d/stateblock.c | 11 -----------
2 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index b13854b..8354114 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3239,12 +3239,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl
return WINED3D_OK;
}
- if (NULL != pDecl) {
- IWineD3DVertexDeclaration_AddRef(pDecl);
- }
- if (NULL != oldDecl) {
- IWineD3DVertexDeclaration_Release(oldDecl);
- }
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL);
return WINED3D_OK;
}
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 33d42ad..ca28027 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -254,10 +254,6 @@ static ULONG WINAPI IWineD3DStateBlockI
IWineD3DVertexShader_Release(This->vertexShader);
}
- if (NULL != This->vertexDecl) {
- IWineD3DVertexDeclaration_Release(This->vertexDecl);
- }
-
/* NOTE: according to MSDN: The application is responsible for making sure the texture references are cleared down */
for (counter = 0; counter < GL_LIMITS(sampler_stages); counter++) {
if (This->textures[counter]) {
@@ -502,13 +498,6 @@ static HRESULT WINAPI IWineD3DStateBloc
if(This->set.vertexDecl && This->vertexDecl != targetStateBlock->vertexDecl){
TRACE("Updating vertex declaration from %p to %p\n", This->vertexDecl, targetStateBlock->vertexDecl);
- if (targetStateBlock->vertexDecl) {
- IWineD3DVertexDeclaration_AddRef(targetStateBlock->vertexDecl);
- }
- if (This->vertexDecl) {
- IWineD3DVertexDeclaration_Release(This->vertexDecl);
- }
-
This->vertexDecl = targetStateBlock->vertexDecl;
}
More information about the wine-cvs
mailing list