mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 09:25:06 +00:00
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.
This commit is contained in:
parent
53bc6c7a4a
commit
d6e4e944af
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue