[PATCH 0/1] MR1814: wined3d: Always bind to GL_ELEMENT_ARRAY_BUFFER if the bind flags include WINED3D_BIND_INDEX_BUFFER.
From: Zebediah Figura <zfigura(a)codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53623 --- dlls/wined3d/buffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 2f6c52ef36f..fa24f006872 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -141,7 +141,11 @@ GLenum wined3d_buffer_gl_binding_from_bind_flags(const struct wined3d_gl_info *g if (!bind_flags) return GL_PIXEL_UNPACK_BUFFER; - if (bind_flags == WINED3D_BIND_INDEX_BUFFER) + /* We must always return GL_ELEMENT_ARRAY_BUFFER here; + * wined3d_device_gl_create_bo() checks the GL binding to see whether we + * can suballocate, and we cannot suballocate if this BO might be used for + * an index buffer. */ + if (bind_flags & WINED3D_BIND_INDEX_BUFFER) return GL_ELEMENT_ARRAY_BUFFER; if (bind_flags & (WINED3D_BIND_SHADER_RESOURCE | WINED3D_BIND_UNORDERED_ACCESS) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1814
This merge request was approved by Jan Sikorski. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1814
participants (3)
-
Jan Sikorski (@jsikorski) -
Zebediah Figura -
Zebediah Figura (@zfigura)