Commit d6e4e944 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Don't try to access unused buffers in wined3d_context_gl_load_numbered_arrays().

wined3d_stream_info_from_declaration() doesn't update elements of the stream_info structure that are not used by the current vertex declaration. That means that there might be obsolete buffer references in stream_info, possibly to buffers that have since been destroyed.
parent 53bc6c7a
......@@ -5675,7 +5675,6 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c
for (i = 0; i < gl_info->limits.vertex_attribs; ++i)
{
const struct wined3d_stream_info_element *element = &stream_info->elements[i];
const void *offset = get_vertex_attrib_pointer(element, state);
const struct wined3d_stream_state *stream;
const struct wined3d_format_gl *format_gl;
......@@ -5733,6 +5732,7 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c
if (element->stride)
{
const void *offset = get_vertex_attrib_pointer(element, state);
unsigned int format_attrs = format_gl->f.attrs;
bo = wined3d_bo_gl_id(element->data.buffer_object);
......
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