Commit aa71065d authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Properly preload index buffers.

parent 5e5b435e
......@@ -2336,6 +2336,13 @@ 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 (device->strided_streams.all_vbo)
wined3d_buffer_preload(state->index_buffer);
else
buffer_get_sysmem(state->index_buffer, context->gl_info);
}
ENTER_GL();
if (context->last_was_blit)
......
......@@ -447,15 +447,8 @@ void device_update_stream_info(struct wined3d_device *device, const struct wined
}
}
if (state->index_buffer && !state->user_stream)
{
if (prev_all_vbo != stream_info->all_vbo)
device_invalidate_state(device, STATE_INDEXBUFFER);
if (stream_info->all_vbo)
wined3d_buffer_preload(state->index_buffer);
else
buffer_get_sysmem(state->index_buffer, gl_info);
}
if (prev_all_vbo != stream_info->all_vbo)
device_invalidate_state(device, STATE_INDEXBUFFER);
}
static void device_preload_texture(const struct wined3d_state *state, unsigned int idx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment