Module: wine Branch: master Commit: 70831d1d2dfcbe8353e597e57f0dc39b700534f1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=70831d1d2dfcbe8353e597e57f...
Author: Stefan Dösinger stefan@codeweavers.com Date: Wed Jan 10 11:43:27 2007 +0100
wined3d: D3D7 vertex buffers never change their declaration.
---
dlls/wined3d/vertexbuffer.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/vertexbuffer.c b/dlls/wined3d/vertexbuffer.c index 181c244..da22469 100644 --- a/dlls/wined3d/vertexbuffer.c +++ b/dlls/wined3d/vertexbuffer.c @@ -165,6 +165,13 @@ inline BOOL WINAPI IWineD3DVertexBufferI WineDirect3DVertexStridedData strided; IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
+ /* In d3d7 the vertex buffer declaration NEVER changes because it is stored in the d3d7 vertex buffer. + * Once we have our declaration there is no need to look it up again. + */ + if(((IWineD3DImpl *)device->wineD3D)->dxVersion == 7 && This->Flags & VBFLAG_HASDESC) { + 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