From: Brian Date: Sat, 21 Apr 2007 20:12:57 +0000 (-0600) Subject: fix SkipPixels bugs in _mesa_pack_bitmap(), bug 10690 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e5cf37c1786057252a4db28d4ae75bd24a0e020b;p=mesa.git fix SkipPixels bugs in _mesa_pack_bitmap(), bug 10690 --- diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index dcd7f10b26e..2220e39f7d7 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -955,8 +955,8 @@ _mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source, /* handling SkipPixels is a bit tricky (no pun intended!) */ GLint i; if (packing->LsbFirst) { - GLubyte srcMask = 1 << (packing->SkipPixels & 0x7); - GLubyte dstMask = 128; + GLubyte srcMask = 128; + GLubyte dstMask = 1 << (packing->SkipPixels & 0x7); const GLubyte *s = src; GLubyte *d = dst; *d = 0; @@ -982,8 +982,8 @@ _mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source, } } else { - GLubyte srcMask = 128 >> (packing->SkipPixels & 0x7); - GLubyte dstMask = 128; + GLubyte srcMask = 128; + GLubyte dstMask = 128 >> (packing->SkipPixels & 0x7); const GLubyte *s = src; GLubyte *d = dst; *d = 0;