ddraw: Fix vertex buffer offset in d3d_execute_buffer_execute().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34666
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2019-10-29 16:19:06 +03:00 committed by Alexandre Julliard
parent 44b49f1a40
commit 2e4b8eaf62
1 changed files with 1 additions and 2 deletions

View File

@ -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,