summaryrefslogtreecommitdiff
path: root/src/mesa/main/texcompress_s3tc.c
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2004-05-04 06:27:06 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2004-05-04 06:27:06 +0000
commit33ffbd1c58dc8582f67d946f9eb26127e9851a10 (patch)
treea3a97552ee012bb549701e0b98020e6adaf3e479 /src/mesa/main/texcompress_s3tc.c
parentabe4a72cfcde712d4b18832e2751d26b94a7718e (diff)
texture compression: getting warmer
Diffstat (limited to 'src/mesa/main/texcompress_s3tc.c')
-rw-r--r--src/mesa/main/texcompress_s3tc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index 35f358a8f3..07ca6b0f01 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);