wined3d: Use wined3d_texture_get_pitch() in wined3d_surface_map().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-02-10 19:30:00 +01:00 committed by Alexandre Julliard
parent bb385366a1
commit 4155c22e25
1 changed files with 7 additions and 2 deletions

View File

@ -2414,10 +2414,15 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
}
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
{
map_desc->row_pitch = surface->resource.width * format->byte_count;
map_desc->slice_pitch = surface->resource.height * map_desc->row_pitch;
}
else
map_desc->row_pitch = wined3d_surface_get_pitch(surface);
map_desc->slice_pitch = surface->resource.height * map_desc->row_pitch;
{
wined3d_texture_get_pitch(surface->container, surface->texture_level,
&map_desc->row_pitch, &map_desc->slice_pitch);
}
if (!box)
{