Module: wine Branch: master Commit: 3e7c800e9c1c2b021021dddbda9178303c63ebb8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3e7c800e9c1c2b021021dddbda...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Sun Jan 6 14:44:08 2013 +0100
wined3d: Get rid of the user_stream field from wined3d_state.
All remaining uses are equivalent to "device->up_strided". (Which should of course eventually go away as well.)
---
dlls/wined3d/context.c | 2 +- dlls/wined3d/device.c | 2 -- dlls/wined3d/drawprim.c | 2 +- dlls/wined3d/wined3d_private.h | 1 - 4 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index c0b66b1..9dfb3a9 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -2298,7 +2298,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de device_preload_textures(device); if (isStateDirty(context, STATE_VDECL) || isStateDirty(context, STATE_STREAMSRC)) device_update_stream_info(device, context->gl_info); - if (state->index_buffer && !state->user_stream) + if (state->index_buffer && !device->up_strided) { if (device->strided_streams.all_vbo) wined3d_buffer_preload(state->index_buffer); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 78997f0..d718b04 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4162,12 +4162,10 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive_strided(struct wined3d_devic
prev_idx_format = device->stateBlock->state.index_format; device->stateBlock->state.index_format = index_data_format_id; - device->stateBlock->state.user_stream = TRUE; device->stateBlock->state.base_vertex_index = 0; 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); diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 67f84a5..ed32ee2 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -676,7 +676,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
if (indexed) { - if (!state->user_stream) + if (!device->up_strided) { struct wined3d_buffer *index_buffer = state->index_buffer; if (!index_buffer->buffer_object || !stream_info->all_vbo) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 09055f7..a045f7a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2296,7 +2296,6 @@ struct wined3d_state struct wined3d_vertex_declaration *vertex_declaration; struct wined3d_stream_output stream_output[MAX_STREAM_OUT]; struct wined3d_stream_state streams[MAX_STREAMS + 1 /* tesselated pseudo-stream */]; - BOOL user_stream; struct wined3d_buffer *index_buffer; enum wined3d_format_id index_format; INT base_vertex_index;