Matteo Bruni : wined3d: Use the proper pitch in read_from_framebuffer().
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Feb 11 10:28:10 CST 2015
Module: wine
Branch: master
Commit: ac3df5e1f1d4595b5d0e9b8404025068ed79bcde
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ac3df5e1f1d4595b5d0e9b8404025068ed79bcde
Author: Matteo Bruni <mbruni at codeweavers.com>
Date: Tue Feb 10 20:14:49 2015 +0100
wined3d: Use the proper pitch in read_from_framebuffer().
This function is only used in the non-default "backbuffer" ORM.
---
dlls/wined3d/surface.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 8aaa82b..8f60769 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2843,7 +2843,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
}
/* Setup pixel store pack state -- to glReadPixels into the correct place */
- gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_ROW_LENGTH, surface->resource.width);
+ gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_ROW_LENGTH,
+ wined3d_surface_get_pitch(surface) / surface->resource.format->byte_count);
checkGLcall("glPixelStorei");
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
More information about the wine-cvs
mailing list