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.)
This commit is contained in:
Henri Verbeet 2013-01-06 14:44:08 +01:00 committed by Alexandre Julliard
parent 5b42297a31
commit 3e7c800e9c
4 changed files with 2 additions and 5 deletions

View File

@ -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);

View File

@ -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);

View File

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

View File

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