[PATCH 1/5] wined3d: Source resources are always non-NULL in wined3d_cs_exec_blt_sub_resource().

Henri Verbeet hverbeet at codeweavers.com
Thu Apr 6 16:44:29 CDT 2017


Since fills no longer go through the blitter.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/wined3d/cs.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index c408eb0..78a3e1d 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -1744,17 +1744,14 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
     }
     else if (op->dst_resource->type == WINED3D_RTYPE_TEXTURE_2D)
     {
-        struct wined3d_surface *dst_surface, *src_surface = NULL;
+        struct wined3d_surface *dst_surface, *src_surface;
         struct wined3d_texture *dst_texture, *src_texture;
         RECT dst_rect, src_rect;
 
         dst_texture = texture_from_resource(op->dst_resource);
+        src_texture = texture_from_resource(op->src_resource);
         dst_surface = dst_texture->sub_resources[op->dst_sub_resource_idx].u.surface;
-        if (op->src_resource)
-        {
-            src_texture = texture_from_resource(op->src_resource);
-            src_surface = src_texture->sub_resources[op->src_sub_resource_idx].u.surface;
-        }
+        src_surface = src_texture->sub_resources[op->src_sub_resource_idx].u.surface;
         SetRect(&dst_rect, op->dst_box.left, op->dst_box.top, op->dst_box.right, op->dst_box.bottom);
         SetRect(&src_rect, op->src_box.left, op->src_box.top, op->src_box.right, op->src_box.bottom);
 
-- 
2.1.4




More information about the wine-patches mailing list