diff options
author | marha <marha@users.sourceforge.net> | 2011-10-10 07:52:38 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-10-10 07:52:38 +0200 |
commit | afbd3947071a33f59dda122f1ac396442a02c128 (patch) | |
tree | e3dde5d2973697c24f73488a421327d09a9337c0 /mesalib/src/mesa/main/texcompress_s3tc.c | |
parent | b520df571e0a319eae5231d09f36b98f28b8914a (diff) | |
download | vcxsrv-afbd3947071a33f59dda122f1ac396442a02c128.tar.gz vcxsrv-afbd3947071a33f59dda122f1ac396442a02c128.tar.bz2 vcxsrv-afbd3947071a33f59dda122f1ac396442a02c128.zip |
fontconfig libX11 mesa pixman xkeyboard-config git updte 10 oct 2011
Diffstat (limited to 'mesalib/src/mesa/main/texcompress_s3tc.c')
-rw-r--r-- | mesalib/src/mesa/main/texcompress_s3tc.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/texcompress_s3tc.c b/mesalib/src/mesa/main/texcompress_s3tc.c index b180c80f0..904aa457e 100644 --- a/mesalib/src/mesa/main/texcompress_s3tc.c +++ b/mesalib/src/mesa/main/texcompress_s3tc.c @@ -178,6 +178,7 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS) if (srcFormat != GL_RGB || srcType != GL_UNSIGNED_BYTE || ctx->_ImageTransferState || + srcPacking->RowLength != srcWidth || srcPacking->SwapBytes) { /* convert image to RGB/GLubyte */ tempImage = _mesa_make_temp_ubyte_image(ctx, dims, @@ -192,7 +193,8 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS) srcFormat = GL_RGB; } else { - pixels = (const GLubyte *) srcAddr; + pixels = _mesa_image_address2d(srcPacking, srcAddr, srcWidth, srcHeight, + srcFormat, srcType, 0, 0); } dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0, @@ -236,6 +238,7 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS) if (srcFormat != GL_RGBA || srcType != GL_UNSIGNED_BYTE || ctx->_ImageTransferState || + srcPacking->RowLength != srcWidth || srcPacking->SwapBytes) { /* convert image to RGBA/GLubyte */ tempImage = _mesa_make_temp_ubyte_image(ctx, dims, @@ -250,7 +253,8 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS) srcFormat = GL_RGBA; } else { - pixels = (const GLubyte *) srcAddr; + pixels = _mesa_image_address2d(srcPacking, srcAddr, srcWidth, srcHeight, + srcFormat, srcType, 0, 0); } dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0, @@ -293,6 +297,7 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS) if (srcFormat != GL_RGBA || srcType != GL_UNSIGNED_BYTE || ctx->_ImageTransferState || + srcPacking->RowLength != srcWidth || srcPacking->SwapBytes) { /* convert image to RGBA/GLubyte */ tempImage = _mesa_make_temp_ubyte_image(ctx, dims, @@ -306,7 +311,8 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS) pixels = tempImage; } else { - pixels = (const GLubyte *) srcAddr; + pixels = _mesa_image_address2d(srcPacking, srcAddr, srcWidth, srcHeight, + srcFormat, srcType, 0, 0); } dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0, @@ -349,6 +355,7 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS) if (srcFormat != GL_RGBA || srcType != GL_UNSIGNED_BYTE || ctx->_ImageTransferState || + srcPacking->RowLength != srcWidth || srcPacking->SwapBytes) { /* convert image to RGBA/GLubyte */ tempImage = _mesa_make_temp_ubyte_image(ctx, dims, @@ -362,7 +369,8 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS) pixels = tempImage; } else { - pixels = (const GLubyte *) srcAddr; + pixels = _mesa_image_address2d(srcPacking, srcAddr, srcWidth, srcHeight, + srcFormat, srcType, 0, 0); } dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0, |