From 2961640bcb4161cff6731e22b95170e52ce5e670 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 22 Nov 2021 18:14:45 -0600 Subject: [PATCH] wined3d: Respect the BO buffer offset in wined3d_buffer_gl_upload_ranges(). Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index d3aeb2e76f4..cd277433c91 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1387,8 +1387,8 @@ static void wined3d_buffer_gl_upload_ranges(struct wined3d_buffer *buffer, struc while (range_count--) { range = &ranges[range_count]; - GL_EXTCALL(glBufferSubData(bo_gl->binding, - range->offset, range->size, (BYTE *)data + range->offset - data_offset)); + GL_EXTCALL(glBufferSubData(bo_gl->binding, bo_gl->b.buffer_offset + range->offset, + range->size, (BYTE *)data + range->offset - data_offset)); } wined3d_context_gl_reference_bo(context_gl, bo_gl); checkGLcall("buffer upload");