Module: wine Branch: master Commit: 44b462c9b4e3d7251e47a5a6a10f6b8b3389b7d3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=44b462c9b4e3d7251e47a5a6a1...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Fri Jan 4 12:03:01 2013 +0100
wined3d: Just restore state->user_stream in wined3d_device_draw_indexed_primitive_strided().
---
dlls/wined3d/device.c | 14 +------------- 1 files changed, 1 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 57eb0d2..78997f0 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4067,13 +4067,6 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT return WINED3DERR_INVALIDCALL; }
- /* The index buffer is not needed here, but restore it, otherwise it is hell to keep track of */ - if (device->stateBlock->state.user_stream) - { - device_invalidate_state(device, STATE_INDEXBUFFER); - device->stateBlock->state.user_stream = FALSE; - } - if (device->stateBlock->state.load_base_vertex_index) { device->stateBlock->state.load_base_vertex_index = 0; @@ -4108,12 +4101,6 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic return WINED3DERR_INVALIDCALL; }
- if (device->stateBlock->state.user_stream) - { - device_invalidate_state(device, STATE_INDEXBUFFER); - device->stateBlock->state.user_stream = FALSE; - } - if (!gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX] && device->stateBlock->state.load_base_vertex_index != device->stateBlock->state.base_vertex_index) { @@ -4180,6 +4167,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive_strided(struct wined3d_devic device->up_strided = strided_data; draw_primitive(device, 0, index_count, 0, 0, TRUE, index_data); device->up_strided = NULL; + device->stateBlock->state.user_stream = FALSE; device->stateBlock->state.index_format = prev_idx_format;
device_invalidate_state(device, STATE_VDECL);