Zebediah Figura : wined3d: Respect the BO address offset when flipping the framebuffer in software.
Alexandre Julliard
julliard at winehq.org
Tue Nov 23 16:03:29 CST 2021
Module: wine
Branch: master
Commit: f059a25af11947b9bd53e3f32efda8d7873f8126
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f059a25af11947b9bd53e3f32efda8d7873f8126
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Mon Nov 22 18:14:41 2021 -0600
wined3d: Respect the BO address offset when flipping the framebuffer in software.
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/surface.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 79dc0bd06b6..9c6f5e18c28 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -419,8 +419,8 @@ void texture2d_read_from_framebuffer(struct wined3d_texture *texture, unsigned i
unsigned int restore_idx;
BYTE *row, *top, *bottom;
BOOL src_is_upside_down;
+ BYTE *mem = NULL;
unsigned int i;
- BYTE *mem;
wined3d_texture_get_memory(texture, sub_resource_idx, &data, dst_location);
@@ -504,8 +504,7 @@ void texture2d_read_from_framebuffer(struct wined3d_texture *texture, unsigned i
mem = GL_EXTCALL(glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_READ_WRITE));
checkGLcall("glMapBuffer");
}
- else
- mem = data.addr;
+ mem += (uintptr_t)data.addr;
top = mem;
bottom = mem + row_pitch * (height - 1);
More information about the wine-cvs
mailing list