Module: wine
Branch: master
Commit: 62fff2eab869a5f92fef0727511e027ea5bcff0d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=62fff2eab869a5f92fef07275…
Author: H. Verbeet <hverbeet(a)gmail.com>
Date: Mon Mar 12 23:22:22 2007 +0100
wined3d: Remove some redundant code in IWineD3DVertexBufferImpl_FindDecl().
---
dlls/wined3d/vertexbuffer.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/vertexbuffer.c b/dlls/wined3d/vertexbuffer.c
index 63b381a..e832439 100644
--- a/dlls/wined3d/vertexbuffer.c
+++ b/dlls/wined3d/vertexbuffer.c
@@ -172,7 +172,6 @@ inline BOOL WINAPI IWineD3DVertexBufferImpl_FindDecl(IWineD3DVertexBufferImpl *T
return FALSE;
}
- memset(&strided, 0, sizeof(strided));
/* There are certain vertex data types that need to be fixed up. The Vertex Buffers FVF doesn't
* help finding them, only the vertex declaration or the device FVF can determine that at drawPrim
* time. Rules are as follows:
@@ -211,12 +210,6 @@ inline BOOL WINAPI IWineD3DVertexBufferImpl_FindDecl(IWineD3DVertexBufferImpl *T
if(strided.u.s.position2.VBO != This->vbo) memset(&strided.u.s.position2, 0, sizeof(strided.u.s.position2));
}
- /* Filter out data that does not come from this VBO */
- if(strided.u.s.position.VBO != This->vbo) memset(&strided.u.s.position, 0, sizeof(strided.u.s.position));
- if(strided.u.s.diffuse.VBO != This->vbo) memset(&strided.u.s.diffuse, 0, sizeof(strided.u.s.diffuse));
- if(strided.u.s.specular.VBO != This->vbo) memset(&strided.u.s.specular, 0, sizeof(strided.u.s.specular));
- if(strided.u.s.position2.VBO != This->vbo) memset(&strided.u.s.position2, 0, sizeof(strided.u.s.position2));
-
/* We have a declaration now in the buffer */
This->Flags |= VBFLAG_HASDESC;
Module: wine
Branch: master
Commit: 6998d0d472b5392ed06c16a7c97ebb2b07d68177
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6998d0d472b5392ed06c16a7c…
Author: H. Verbeet <hverbeet(a)gmail.com>
Date: Mon Mar 12 23:22:16 2007 +0100
wined3d: Remove a redundant check in handleStreams().
---
dlls/wined3d/state.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index f3acb3b..4349206 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -2800,7 +2800,7 @@ static inline void handleStreams(IWineD3DStateBlockImpl *stateblock, BOOL useVer
if(TRACE_ON(d3d)) {
drawPrimitiveTraceDataLocations(dataLocations);
}
- } else if (stateblock->vertexDecl || stateblock->vertexShader) {
+ } else if (stateblock->vertexDecl) {
/* Note: This is a fixed function or shader codepath.
* This means it must handle both types of strided data.
* Shaders must go through here to zero the strided data, even if they
@@ -2808,11 +2808,8 @@ static inline void handleStreams(IWineD3DStateBlockImpl *stateblock, BOOL useVer
*/
TRACE("================ Vertex Declaration ===================\n");
memset(dataLocations, 0, sizeof(*dataLocations));
-
- if (stateblock->vertexDecl) {
- primitiveDeclarationConvertToStridedData((IWineD3DDevice *) device, useVertexShaderFunction,
- dataLocations, &fixup);
- }
+ primitiveDeclarationConvertToStridedData((IWineD3DDevice *) device,
+ useVertexShaderFunction, dataLocations, &fixup);
} else {
/* Note: This codepath is not reachable from d3d9 (see fvf->decl9 conversion)
* It is reachable through d3d8, but only for fixed-function.