From 03501e7a29138e030b43746dcc71781b9652a113 Mon Sep 17 00:00:00 2001 From: Daniel Borca Date: Fri, 29 Oct 2004 13:25:44 +0000 Subject: decoder "width" parameter represents "stride-in-pixels" --- src/mesa/main/texcompress_fxt1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c index ec7971e91f1..0528e01c20d 100644 --- a/src/mesa/main/texcompress_fxt1.c +++ b/src/mesa/main/texcompress_fxt1.c @@ -47,7 +47,7 @@ fxt1_encode (GLcontext *ctx, const void *source, int srcRowStride, void *dest, int destRowStride); void -fxt1_decode_1 (const void *texture, int width, +fxt1_decode_1 (const void *texture, int stride, int i, int j, unsigned char *rgba); @@ -1749,7 +1749,7 @@ fxt1_decode_1ALPHA (unsigned char *code, int t, unsigned char *rgba) void -fxt1_decode_1 (const void *texture, int width, +fxt1_decode_1 (const void *texture, int stride, /* in pixels */ int i, int j, unsigned char *rgba) { static void (*decode_1[]) (unsigned char *, int, unsigned char *) = { @@ -1764,7 +1764,7 @@ fxt1_decode_1 (const void *texture, int width, }; unsigned char *code = (unsigned char *)texture + - ((j / 4) * (width / 8) + (i / 8)) * 16; + ((j / 4) * (stride / 8) + (i / 8)) * 16; int mode = CC_SEL((unsigned long *)code, 125); int t = i & 7; -- cgit v1.2.3