[10/10] wined3d: Set the stream offset to 0 in
DrawPrimitiveUP/DrawIndexedPrimitiveUP
H. Verbeet
hverbeet at gmail.com
Sun Apr 8 18:55:27 CDT 2007
We currently set the stream source and the stream stride, but forget
about the offset. This should fix the crash in bug 7988.
Changelog:
- Set the stream offset to 0 in DrawPrimitiveUP/DrawIndexedPrimitiveUP
-------------- next part --------------
---
dlls/wined3d/device.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index a463b1a..459a0d7 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4407,6 +4407,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface,
/* Note in the following, it's not this type, but that's the purpose of streamIsUP */
This->stateBlock->streamSource[0] = (IWineD3DVertexBuffer *)pVertexStreamZeroData;
+ This->stateBlock->streamOffset[0] = 0;
This->stateBlock->streamStride[0] = VertexStreamZeroStride;
This->stateBlock->streamIsUP = TRUE;
This->stateBlock->loadBaseVertexIndex = 0;
@@ -4449,6 +4450,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *
/* Note in the following, it's not this type, but that's the purpose of streamIsUP */
This->stateBlock->streamSource[0] = (IWineD3DVertexBuffer *)pVertexStreamZeroData;
This->stateBlock->streamIsUP = TRUE;
+ This->stateBlock->streamOffset[0] = 0;
This->stateBlock->streamStride[0] = VertexStreamZeroStride;
/* Set to 0 as per msdn. Do it now due to the stream source loading during drawPrimitive */
More information about the wine-patches
mailing list