wined3d: Do not add the BO address offset when calling glFlushMappedBufferRange().

Fixes: c2f0ae50b4
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2021-11-23 21:17:08 -06:00 committed by Alexandre Julliard
parent 0e501c00c4
commit 052dbb427d

View file

@ -2759,8 +2759,9 @@ static void flush_bo_ranges(struct wined3d_context_gl *context_gl, const struct
{ {
for (i = 0; i < range_count; ++i) for (i = 0; i < range_count; ++i)
{ {
GL_EXTCALL(glFlushMappedBufferRange(bo->binding, /* The offset passed to glFlushMappedBufferRange() is relative to
(UINT_PTR)data->addr + ranges[i].offset, ranges[i].size)); * the mapped range, so don't add data->addr in this case. */
GL_EXTCALL(glFlushMappedBufferRange(bo->binding, ranges[i].offset, ranges[i].size));
} }
} }
else if (gl_info->supported[APPLE_FLUSH_BUFFER_RANGE]) else if (gl_info->supported[APPLE_FLUSH_BUFFER_RANGE])