[PATCH] ddraw: Fix vertex buffer offset in d3d_execute_buffer_execute().

Paul Gofman gofmanp at gmail.com
Tue Oct 29 08:19:06 CDT 2019


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34666
Signed-off-by: Paul Gofman <gofmanp at gmail.com>
---
 dlls/ddraw/executebuffer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c
index 80dbdfd88b..9f0fdb85e5 100644
--- a/dlls/ddraw/executebuffer.c
+++ b/dlls/ddraw/executebuffer.c
@@ -107,7 +107,6 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
                 }
 
                 index_count = count * primitive_size;
-
                 if (buffer->index_size < index_count)
                 {
                     unsigned int new_size = max(buffer->index_size * 2, index_count);
@@ -302,7 +301,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
                         case D3DPROCESSVERTICES_TRANSFORMLIGHT:
                         case D3DPROCESSVERTICES_TRANSFORM:
                             wined3d_device_set_stream_source(device->wined3d_device, 0,
-                                    buffer->src_vertex_buffer, buffer->src_vertex_pos, sizeof(D3DVERTEX));
+                                    buffer->src_vertex_buffer, buffer->src_vertex_pos * sizeof(D3DVERTEX), sizeof(D3DVERTEX));
                             wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_LIGHTING,
                                     op == D3DPROCESSVERTICES_TRANSFORMLIGHT && !!device->material);
                             wined3d_device_set_vertex_declaration(device->wined3d_device,
-- 
2.21.0




More information about the wine-devel mailing list