diff options
author | marha <marha@users.sourceforge.net> | 2012-01-06 19:27:25 +0100 |
---|---|---|
committer | Marc Haesen <marc@hc-consult.be> | 2012-01-06 19:27:25 +0100 |
commit | 7e9f4ea970e8f7008c212d7d3918a974eb0066da (patch) | |
tree | 92cf7fcdf6e8093e743346af2397f3caa17cffe3 /mesalib/src/mesa/main/texcompress_s3tc.c | |
parent | 9715b7fab0757c86e1bb151f3dce0b324bcff692 (diff) | |
download | vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.gz vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.bz2 vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.zip |
libX11 mesa pixman git update 6 jan 2012
Diffstat (limited to 'mesalib/src/mesa/main/texcompress_s3tc.c')
-rw-r--r-- | mesalib/src/mesa/main/texcompress_s3tc.c | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/mesalib/src/mesa/main/texcompress_s3tc.c b/mesalib/src/mesa/main/texcompress_s3tc.c index ed7eae4f4..995e079fd 100644 --- a/mesalib/src/mesa/main/texcompress_s3tc.c +++ b/mesalib/src/mesa/main/texcompress_s3tc.c @@ -165,15 +165,10 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS) { const GLubyte *pixels; GLubyte *dst; - const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */ const GLubyte *tempImage = NULL; ASSERT(dstFormat == MESA_FORMAT_RGB_DXT1 || dstFormat == MESA_FORMAT_SRGB_DXT1); - ASSERT(dstXoffset % 4 == 0); - ASSERT(dstYoffset % 4 == 0); - ASSERT(dstZoffset % 4 == 0); - (void) dstZoffset; if (srcFormat != GL_RGB || srcType != GL_UNSIGNED_BYTE || @@ -197,9 +192,7 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS) srcFormat, srcType, 0, 0); } - dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0, - dstFormat, - texWidth, dstSlices[0]); + dst = dstSlices[0]; if (ext_tx_compress_dxtn) { (*ext_tx_compress_dxtn)(3, srcWidth, srcHeight, pixels, @@ -225,15 +218,10 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS) { const GLubyte *pixels; GLubyte *dst; - const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */ const GLubyte *tempImage = NULL; ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT1 || dstFormat == MESA_FORMAT_SRGBA_DXT1); - ASSERT(dstXoffset % 4 == 0); - ASSERT(dstYoffset % 4 == 0); - ASSERT(dstZoffset % 4 == 0); - (void) dstZoffset; if (srcFormat != GL_RGBA || srcType != GL_UNSIGNED_BYTE || @@ -257,9 +245,8 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS) srcFormat, srcType, 0, 0); } - dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0, - dstFormat, - texWidth, dstSlices[0]); + dst = dstSlices[0]; + if (ext_tx_compress_dxtn) { (*ext_tx_compress_dxtn)(4, srcWidth, srcHeight, pixels, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, @@ -284,15 +271,10 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS) { const GLubyte *pixels; GLubyte *dst; - const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */ const GLubyte *tempImage = NULL; ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT3 || dstFormat == MESA_FORMAT_SRGBA_DXT3); - ASSERT(dstXoffset % 4 == 0); - ASSERT(dstYoffset % 4 == 0); - ASSERT(dstZoffset % 4 == 0); - (void) dstZoffset; if (srcFormat != GL_RGBA || srcType != GL_UNSIGNED_BYTE || @@ -315,9 +297,8 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS) srcFormat, srcType, 0, 0); } - dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0, - dstFormat, - texWidth, dstSlices[0]); + dst = dstSlices[0]; + if (ext_tx_compress_dxtn) { (*ext_tx_compress_dxtn)(4, srcWidth, srcHeight, pixels, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, @@ -342,15 +323,10 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS) { const GLubyte *pixels; GLubyte *dst; - const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */ const GLubyte *tempImage = NULL; ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT5 || dstFormat == MESA_FORMAT_SRGBA_DXT5); - ASSERT(dstXoffset % 4 == 0); - ASSERT(dstYoffset % 4 == 0); - ASSERT(dstZoffset % 4 == 0); - (void) dstZoffset; if (srcFormat != GL_RGBA || srcType != GL_UNSIGNED_BYTE || @@ -373,9 +349,8 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS) srcFormat, srcType, 0, 0); } - dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0, - dstFormat, - texWidth, dstSlices[0]); + dst = dstSlices[0]; + if (ext_tx_compress_dxtn) { (*ext_tx_compress_dxtn)(4, srcWidth, srcHeight, pixels, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, |