From 33ffbd1c58dc8582f67d946f9eb26127e9851a10 Mon Sep 17 00:00:00 2001 From: Daniel Borca Date: Tue, 4 May 2004 06:27:06 +0000 Subject: texture compression: getting warmer --- src/mesa/main/texcompress_s3tc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/main/texcompress_s3tc.c') diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c index 35f358a8f38..07ca6b0f014 100644 --- a/src/mesa/main/texcompress_s3tc.c +++ b/src/mesa/main/texcompress_s3tc.c @@ -57,7 +57,7 @@ texstore_rgb_dxt1(STORE_PARAMS) const GLchan *pixels; GLint srcRowStride; GLubyte *dst; - const GLint texWidth = dstRowStride / 2; /* a bit of a hack */ + const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */ const GLchan *tempImage = NULL; ASSERT(dstFormat == &_mesa_texformat_rgb_dxt1); @@ -114,7 +114,7 @@ texstore_rgba_dxt1(STORE_PARAMS) const GLchan *pixels; GLint srcRowStride; GLubyte *dst; - const GLint texWidth = dstRowStride / 2; /* a bit of a hack */ + const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */ const GLchan *tempImage = NULL; ASSERT(dstFormat == &_mesa_texformat_rgba_dxt1); @@ -169,7 +169,7 @@ texstore_rgba_dxt3(STORE_PARAMS) const GLchan *pixels; GLint srcRowStride; GLubyte *dst; - const GLint texWidth = dstRowStride / 4; /* a bit of a hack */ + const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */ const GLchan *tempImage = NULL; ASSERT(dstFormat == &_mesa_texformat_rgba_dxt3); @@ -223,7 +223,7 @@ texstore_rgba_dxt5(STORE_PARAMS) const GLchan *pixels; GLint srcRowStride; GLubyte *dst; - const GLint texWidth = dstRowStride / 4; /* a bit of a hack */ + const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */ const GLchan *tempImage = NULL; ASSERT(dstFormat == &_mesa_texformat_rgba_dxt5); -- cgit v1.2.3