[PATCH 4/5] wined3d: Always initialize fx field in struct wined3d_cs_blt_sub_resource (Valgrind).

Matteo Bruni mbruni at codeweavers.com
Tue Sep 12 14:22:30 CDT 2017


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
 dlls/wined3d/cs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index b3b6588ff9..0b9b0f5bdc 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -1996,7 +1996,7 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
         SetRect(&src_rect, op->src_box.left, op->src_box.top, op->src_box.right, op->src_box.bottom);
 
         if (FAILED(wined3d_surface_blt(dst_surface, &dst_rect, src_surface,
-                &src_rect, op->flags, &op->fx, op->filter)))
+                &src_rect, op->flags, op->fx.fx ? &op->fx : NULL, op->filter)))
             FIXME("Blit failed.\n");
     }
     else if (op->dst_resource->type == WINED3D_RTYPE_TEXTURE_3D)
@@ -2110,6 +2110,8 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
     op->flags = flags;
     if (fx)
         op->fx = *fx;
+    else
+        op->fx.fx = 0;
     op->filter = filter;
 
     wined3d_resource_acquire(dst_resource);
-- 
2.13.5




More information about the wine-patches mailing list