Module: wine Branch: master Commit: fe0342e64685ebf69343c3e219fb88039a5b4e2b URL: http://source.winehq.org/git/wine.git/?a=commit;h=fe0342e64685ebf69343c3e219...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Sun Apr 17 19:07:53 2016 +0200
wined3d: Use the texture dimension helpers in surface_download_data().
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/surface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index dd3a27e..741bfa3 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -991,7 +991,9 @@ static void surface_download_data(struct wined3d_surface *surface, const struct { wined3d_texture_get_pitch(texture, surface->texture_level, &dst_row_pitch, &dst_slice_pitch); wined3d_format_calculate_pitch(format, texture->resource.device->surface_alignment, - surface->pow2Width, surface->pow2Height, &src_row_pitch, &src_slice_pitch); + wined3d_texture_get_level_pow2_width(texture, surface->texture_level), + wined3d_texture_get_level_pow2_height(texture, surface->texture_level), + &src_row_pitch, &src_slice_pitch); mem = HeapAlloc(GetProcessHeap(), 0, src_slice_pitch); } else