From f020251d2b51b099870ca37a283a2c4744cf4e20 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 19 Nov 2013 10:28:49 +0100 Subject: [PATCH] wined3d: Surfaces always have a container in fb_copy_to_texture_direct(). --- 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 f054b43a00c..a0ca8babd24 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");