gallium/u_blit: set dst format from pipe_resource, not pipe_surface
authorMarek Olšák <maraeo@gmail.com>
Sun, 5 Aug 2012 00:46:41 +0000 (02:46 +0200)
committerMarek Olšák <maraeo@gmail.com>
Wed, 15 Aug 2012 17:20:57 +0000 (19:20 +0200)
We use it to decide whether we can use resource_copy_region.

NOTE: This is a candidate for the 8.0 branch.

src/gallium/auxiliary/util/u_blit.c

index 3887e65fbd43accf4738ee42e7092ff632b54983..7ec4aa3a4dc1892b1dc257edd73039d2c3165768 100644 (file)
@@ -464,7 +464,7 @@ util_blit_pixels(struct blit_state *ctx,
                       dstX0, dstY0, dstX1, dstY1);
 
    src_format = util_format_linear(src_tex->format);
-   dst_format = util_format_linear(dst->format);
+   dst_format = util_format_linear(dst->texture->format);
 
    /* See whether we will blit depth or stencil. */
    is_depth = util_format_has_depth(src_desc);