Henri Verbeet : wined3d: Respect the BO memory offset in wined3d_context_gl_map_bo_address().
Alexandre Julliard
julliard at winehq.org
Wed Dec 1 15:23:49 CST 2021
Module: wine
Branch: master
Commit: c590681e71c444116db71d57243708188e42f70c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c590681e71c444116db71d57243708188e42f70c
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Nov 30 17:55:22 2021 -0600
wined3d: Respect the BO memory offset in wined3d_context_gl_map_bo_address().
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/context_gl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
index 0c8ee0f605b..f02a0f400a6 100644
--- a/dlls/wined3d/context_gl.c
+++ b/dlls/wined3d/context_gl.c
@@ -2739,7 +2739,7 @@ void *wined3d_context_gl_map_bo_address(struct wined3d_context_gl *context_gl,
return NULL;
}
- return (uint8_t *)map_ptr + (uintptr_t)data->addr;
+ return (uint8_t *)map_ptr + bo->buffer_offset + (uintptr_t)data->addr;
}
static void flush_bo_ranges(struct wined3d_context_gl *context_gl, const struct wined3d_const_bo_address *data,
@@ -2771,7 +2771,7 @@ static void flush_bo_ranges(struct wined3d_context_gl *context_gl, const struct
for (i = 0; i < range_count; ++i)
{
GL_EXTCALL(glFlushMappedBufferRangeAPPLE(bo->binding,
- (uintptr_t)data->addr + ranges[i].offset, ranges[i].size));
+ bo->b.buffer_offset + (uintptr_t)data->addr + ranges[i].offset, ranges[i].size));
checkGLcall("glFlushMappedBufferRangeAPPLE");
}
}
More information about the wine-cvs
mailing list