[10/23] d3d11: Reset base vertex index to zero when not using indexed draw.

Andrew Wesie awesie at gmail.com
Sun Nov 13 12:35:10 CST 2016


Signed-off-by: Andrew Wesie <awesie at gmail.com>
---
 dlls/d3d11/device.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 72e6a71..c354a39 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -253,6 +253,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_Draw(ID3D11DeviceContext *
             iface, vertex_count, start_vertex_location);
 
     wined3d_mutex_lock();
+    wined3d_device_set_base_vertex_index(device->wined3d_device, 0);
     wined3d_device_draw_primitive(device->wined3d_device, start_vertex_location, vertex_count);
     wined3d_mutex_unlock();
 }
@@ -396,6 +397,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DrawInstanced(ID3D11Device
             start_instance_location);
 
     wined3d_mutex_lock();
+    wined3d_device_set_base_vertex_index(device->wined3d_device, 0);
     wined3d_device_draw_primitive_instanced(device->wined3d_device, start_vertex_location,
             instance_vertex_count, start_instance_location, instance_count);
     wined3d_mutex_unlock();
@@ -3157,6 +3159,7 @@ static void STDMETHODCALLTYPE d3d10_device_Draw(ID3D10Device1 *iface, UINT verte
             iface, vertex_count, start_vertex_location);
 
     wined3d_mutex_lock();
+    wined3d_device_set_base_vertex_index(device->wined3d_device, 0);
     wined3d_device_draw_primitive(device->wined3d_device, start_vertex_location, vertex_count);
     wined3d_mutex_unlock();
 }
@@ -3260,6 +3263,7 @@ static void STDMETHODCALLTYPE d3d10_device_DrawInstanced(ID3D10Device1 *iface,
             start_vertex_location, start_instance_location);
 
     wined3d_mutex_lock();
+    wined3d_device_set_base_vertex_index(device->wined3d_device, 0);
     wined3d_device_draw_primitive_instanced(device->wined3d_device, start_vertex_location,
             instance_vertex_count, start_instance_location, instance_count);
     wined3d_mutex_unlock();
-- 
2.7.4




More information about the wine-patches mailing list