summaryrefslogtreecommitdiff
path: root/src/mesa/main/texcompress_fxt1.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_fxt1.c
parentabe4a72cfcde712d4b18832e2751d26b94a7718e (diff)
texture compression: getting warmer
Diffstat (limited to 'src/mesa/main/texcompress_fxt1.c')
-rw-r--r--src/mesa/main/texcompress_fxt1.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index 2d25f5b6e0..e654512371 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -40,14 +40,14 @@
#include "texstore.h"
-static GLint
+static GLuint
compress_fxt1 (GLcontext *ctx,
- GLint srcWidth,
- GLint srcHeight,
+ GLsizei srcWidth,
+ GLsizei srcHeight,
GLenum srcFormat,
- const GLvoid *pixels,
+ const GLchan *source,
GLint srcRowStride,
- GLvoid *dst,
+ GLubyte *dest,
GLint dstRowStride);
@@ -69,12 +69,9 @@ texstore_rgb_fxt1(STORE_PARAMS)
const GLchan *pixels;
GLint srcRowStride;
GLubyte *dst;
- GLint texWidth;
+ const GLint texWidth = dstRowStride * 8 / 16; /* a bit of a hack */
const GLchan *tempImage = NULL;
- dstRowStride = _mesa_compressed_row_stride(GL_COMPRESSED_RGB_FXT1_3DFX, srcWidth);
- texWidth = dstRowStride * 8 / 16; /* a bit of a hack */
-
ASSERT(dstFormat == &_mesa_texformat_rgb_fxt1);
ASSERT(dstXoffset % 8 == 0);
ASSERT(dstYoffset % 4 == 0);
@@ -130,13 +127,10 @@ texstore_rgba_fxt1(STORE_PARAMS)
const GLchan *pixels;
GLint srcRowStride;
GLubyte *dst;
- GLint texWidth;
+ GLint texWidth = dstRowStride * 8 / 16; /* a bit of a hack */
const GLchan *tempImage = NULL;
- dstRowStride = _mesa_compressed_row_stride(GL_COMPRESSED_RGBA_FXT1_3DFX, srcWidth);
- texWidth = dstRowStride * 8 / 16; /* a bit of a hack */
-
- ASSERT(dstFormat == &_mesa_texformat_rgba_dxt1);
+ ASSERT(dstFormat == &_mesa_texformat_rgba_fxt1);
ASSERT(dstXoffset % 8 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset == 0);
@@ -269,14 +263,14 @@ const struct gl_texture_format _mesa_texformat_rgba_fxt1 = {
};
-static GLint
+static GLuint
compress_fxt1 (GLcontext *ctx,
- GLint srcWidth,
- GLint srcHeight,
+ GLsizei srcWidth,
+ GLsizei srcHeight,
GLenum srcFormat,
- const GLvoid *pixels,
+ const GLchan *source,
GLint srcRowStride,
- GLvoid *dst,
+ GLubyte *dest,
GLint dstRowStride)
{
/* here be dragons */