It may load buffers into a different location.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/wined3d/context_gl.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index d2dd9e0bd09..09c871efcd4 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -3963,12 +3963,23 @@ static BOOL context_apply_draw_state(struct wined3d_context *context, device_invalidate_state(device, STATE_STREAMSRC); else wined3d_buffer_load(&buffer_gl->b, context, state); - wined3d_context_gl_reference_bo(context_gl, &buffer_gl->bo); } /* Loading the buffers above may have invalidated the stream info. */ if (wined3d_context_is_graphics_state_dirty(context, STATE_STREAMSRC)) context_update_stream_info(context, state);
+ map = context->stream_info.use_map; + while (map) + { + const struct wined3d_stream_info_element *e; + struct wined3d_buffer_gl *buffer_gl; + + e = &context->stream_info.elements[wined3d_bit_scan(&map)]; + buffer_gl = wined3d_buffer_gl(state->streams[e->stream_idx].buffer); + + wined3d_context_gl_reference_bo(context_gl, &buffer_gl->bo); + } + if (indexed && state->index_buffer) { struct wined3d_buffer_gl *buffer_gl = wined3d_buffer_gl(state->index_buffer);