meta_blit: properly compute texture width for the CopyTexSubImage fallback
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 13 Jun 2014 19:15:04 +0000 (12:15 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 13 Jun 2014 20:09:21 +0000 (13:09 -0700)
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/common/meta_blit.c

index f26ef93c1b9261db5f262fd550ea06640b4c469d..bbf0c3c453023758d01f224ed8a8312d5c7dc769 100644 (file)
@@ -407,7 +407,7 @@ blitframebuffer_texture(struct gl_context *ctx,
       }
    } else {
       GLenum tex_base_format;
-      int srcW = abs(srcY1 - srcY0);
+      int srcW = abs(srcX1 - srcX0);
       int srcH = abs(srcY1 - srcY0);
       /* Fall back to doing a CopyTexSubImage to get the destination
        * renderbuffer into a texture.