Module: wine Branch: master Commit: d6e4e944af1c93dbb8ffeaab62d14af42fe8b738 URL: https://gitlab.winehq.org/wine/wine/-/commit/d6e4e944af1c93dbb8ffeaab62d14af...
Author: Matteo Bruni mbruni@codeweavers.com Date: Wed Sep 14 23:07:17 2022 +0200
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.
---
dlls/wined3d/context_gl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index af46cd9dfd7..5df0865824c 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -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);