wined3d: Use the proper pitch in read_from_framebuffer().

This function is only used in the non-default "backbuffer" ORM.
This commit is contained in:
Matteo Bruni 2015-02-10 20:14:49 +01:00 committed by Alexandre Julliard
parent 20e61b396e
commit ac3df5e1f1
1 changed files with 2 additions and 1 deletions

View File

@ -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,