[PATCH 3/5] wined3d: Set the surface pitch for user-memory surfaces.
Matteo Bruni
mbruni at codeweavers.com
Tue Feb 10 13:14:50 CST 2015
---
dlls/wined3d/surface.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 8f60769..3428535 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2212,10 +2212,15 @@ 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
+ {
surface->resource.size = wined3d_format_calculate_size(texture_resource->format,
texture_resource->device->surface_alignment, 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
--
2.0.5
More information about the wine-patches
mailing list