On Wed, 2005-10-05 at 15:42 +1000, Benjamin Herrenschmidt wrote:
> diff -urN Mesa.orig/src/mesa/main/texstore.c Mesa/src/mesa/main/texstore.c
> --- Mesa.orig/src/mesa/main/texstore.c 2005-10-04 13:07:14.000000000
> +1000
> +++ Mesa/src/mesa/main/texstore.c 2005-10-05 15:33:33.000000000 +1000
> @@ -1926,7 +1926,7 @@
> GLushort *pRow = pImage;
> for (row = 0; row < srcHeight; row++) {
> _mesa_swap2(pRow, srcWidth);
> - pRow += dstRowStride;
> + pRow += dstRowStride >> 1;
> }
> pImage += dstImageStride;
And I suppose pImage has the same problem (though I'm not 100% sure here
as I haven't tested the case), thus the proper patch would be:
diff -urN Mesa.orig/src/mesa/main/texstore.c Mesa/src/mesa/main/texstore.c
--- Mesa.orig/src/mesa/main/texstore.c 2005-10-04 13:07:14.000000000 +1000
+++ Mesa/src/mesa/main/texstore.c 2005-10-05 15:46:31.000000000 +1000
@@ -1926,9 +1926,9 @@
GLushort *pRow = pImage;
for (row = 0; row < srcHeight; row++) {
_mesa_swap2(pRow, srcWidth);
- pRow += dstRowStride;
+ pRow += dstRowStride >> 1;
}
- pImage += dstImageStride;
+ pImage += dstImageStride >> 1;
}
}
return GL_TRUE;
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel