Commit 24fbe9f2 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Pass the destination pitch to format conversion functions.

The relation between src and dst pitches is not correct if the source pitch is padded to match pitch alignment requirements.
parent 0fb3aaac
......@@ -5524,7 +5524,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
context_release(context);
return E_OUTOFMEMORY;
}
format.convert(surface->resource.allocatedMemory, mem, src_pitch, width, height);
format.convert(surface->resource.allocatedMemory, mem, src_pitch, dst_pitch, width, height);
format.byte_count = format.conv_byte_count;
src_pitch = dst_pitch;
}
......
......@@ -2970,7 +2970,7 @@ struct wined3d_format
unsigned int flags;
struct wined3d_rational height_scale;
struct color_fixup_desc color_fixup;
void (*convert)(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height);
void (*convert)(const BYTE *src, BYTE *dst, UINT src_pitch, UINT dst_pitch, UINT width, UINT height);
};
const struct wined3d_format *wined3d_get_format(const struct wined3d_gl_info *gl_info,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment