mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
d3d8: Upload vertex buffer range relative to base vertex index.
Fixes a regression introduced by 75b7ff6056
.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46357
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0a41f5b0a2
commit
ce8ef46ace
1 changed files with 3 additions and 1 deletions
|
@ -2344,6 +2344,7 @@ static HRESULT WINAPI d3d8_device_DrawIndexedPrimitive(IDirect3DDevice8 *iface,
|
|||
{
|
||||
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
|
||||
unsigned int index_count;
|
||||
int base_vertex_index;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, vertex_count %u, start_idx %u, primitive_count %u.\n",
|
||||
|
@ -2351,7 +2352,8 @@ static HRESULT WINAPI d3d8_device_DrawIndexedPrimitive(IDirect3DDevice8 *iface,
|
|||
|
||||
index_count = vertex_count_from_primitive_count(primitive_type, primitive_count);
|
||||
wined3d_mutex_lock();
|
||||
d3d8_device_upload_sysmem_vertex_buffers(device, min_vertex_idx, vertex_count);
|
||||
base_vertex_index = wined3d_device_get_base_vertex_index(device->wined3d_device);
|
||||
d3d8_device_upload_sysmem_vertex_buffers(device, base_vertex_index + min_vertex_idx, vertex_count);
|
||||
d3d8_device_upload_sysmem_index_buffer(device, start_idx, index_count);
|
||||
wined3d_device_set_primitive_type(device->wined3d_device, primitive_type, 0);
|
||||
hr = wined3d_device_draw_indexed_primitive(device->wined3d_device, start_idx, index_count);
|
||||
|
|
Loading…
Reference in a new issue