[PATCH 4/5] wined3d: Surfaces always have a container in fb_copy_to_texture_direct().

Henri Verbeet hverbeet at codeweavers.com
Tue Nov 19 03:28:49 CST 2013


---
 dlls/wined3d/surface.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index f054b43..a0ca8ba 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4289,12 +4289,6 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
     struct wined3d_context *context;
     BOOL upsidedown = FALSE;
     RECT dst_rect = *dst_rect_in;
-    GLenum dst_target;
-
-    if (dst_surface->container)
-        dst_target = dst_surface->container->target;
-    else
-        dst_target = dst_surface->texture_target;
 
     /* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
      * glCopyTexSubImage is a bit picky about the parameters we pass to it
@@ -4312,7 +4306,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
     surface_internal_preload(dst_surface, context, SRGB_RGB);
 
     /* Bind the target texture */
-    context_bind_texture(context, dst_target, dst_surface->texture_name);
+    context_bind_texture(context, dst_surface->container->target, dst_surface->texture_name);
     if (surface_is_offscreen(src_surface))
     {
         TRACE("Reading from an offscreen target\n");
-- 
1.7.10.4




More information about the wine-patches mailing list