wined3d: Surfaces always have a container in fb_copy_to_texture_direct().

This commit is contained in:
Henri Verbeet 2013-11-19 10:28:49 +01:00 committed by Alexandre Julliard
parent 2d262b3c97
commit f020251d2b
1 changed files with 1 additions and 7 deletions

View File

@ -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");