Commit d56c168d authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Set the surface pitch for user-memory surfaces.

parent d49d2a5d
......@@ -2187,10 +2187,16 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
surface->resource.multisample_type = texture_resource->multisample_type;
surface->resource.multisample_quality = texture_resource->multisample_quality;
if (surface->pitch)
{
surface->resource.size = height * surface->pitch;
}
else
{
/* User memory surfaces don't have the regular surface alignment. */
surface->resource.size = wined3d_format_calculate_size(texture_resource->format,
texture_resource->device->surface_alignment, width, height, 1);
1, width, height, 1);
surface->pitch = wined3d_format_calculate_pitch(texture_resource->format, width);
}
/* The format might be changed to a format that needs conversion.
* If the surface didn't use PBOs previously but could now, don't
......
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