aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texcompress_fxt1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/texcompress_fxt1.c')
-rw-r--r--src/mesa/main/texcompress_fxt1.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index 603f434f209..3aa5e663988 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -57,6 +57,7 @@ fxt1_decode_1 (const void *texture, int width,
void
_mesa_init_texture_fxt1( GLcontext *ctx )
{
+ (void) ctx;
}
@@ -76,6 +77,7 @@ texstore_rgb_fxt1(STORE_PARAMS)
ASSERT(dstXoffset % 8 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGB ||
srcType != CHAN_TYPE ||
@@ -131,6 +133,7 @@ texstore_rgba_fxt1(STORE_PARAMS)
ASSERT(dstXoffset % 8 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGBA ||
srcType != CHAN_TYPE ||
@@ -174,6 +177,7 @@ static void
fetch_texel_2d_rgba_fxt1( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) k;
fxt1_decode_1(texImage->Data, texImage->Width, i, j, texel);
}
@@ -184,6 +188,7 @@ fetch_texel_2d_f_rgba_fxt1( const struct gl_texture_image *texImage,
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
+ (void) k;
fxt1_decode_1(texImage->Data, texImage->Width, i, j, rgba);
texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
@@ -196,6 +201,7 @@ static void
fetch_texel_2d_rgb_fxt1( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) k;
fxt1_decode_1(texImage->Data, texImage->Width, i, j, texel);
texel[ACOMP] = 255;
}
@@ -207,6 +213,7 @@ fetch_texel_2d_f_rgb_fxt1( const struct gl_texture_image *texImage,
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
+ (void) k;
fxt1_decode_1(texImage->Data, texImage->Width, i, j, rgba);
texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
@@ -316,6 +323,7 @@ typedef struct {
#endif /* !__GNUC__ */
+#if 0 /* unused */
static int
fxt1_bestcol (float vec[][MAX_COMP], int nv,
@@ -360,6 +368,7 @@ fxt1_worst (float vec[MAX_COMP],
return worst;
}
+#endif /* unused */
static int
fxt1_variance (double variance[MAX_COMP],
@@ -390,6 +399,7 @@ fxt1_variance (double variance[MAX_COMP],
return best;
}
+#if 0 /* unused */
static int
fxt1_choose (float vec[][MAX_COMP], int nv,
@@ -678,6 +688,7 @@ fxt1_quantize_ALPHA0 (unsigned long *cc,
cc[0] = lolo;
}
+#endif /* unused */
static void
fxt1_quantize_ALPHA1 (unsigned long *cc,
@@ -868,6 +879,7 @@ fxt1_quantize_ALPHA1 (unsigned long *cc,
((Fx64 *)cc)[1] = hi;
}
+#if 0 /* unused*/
static void
fxt1_quantize_HI (unsigned long *cc,
@@ -966,6 +978,7 @@ fxt1_quantize_HI (unsigned long *cc,
}
}
+#endif /* unused */
static void
fxt1_quantize_MIXED1 (unsigned long *cc,
@@ -1284,7 +1297,7 @@ fxt1_quantize_MIXED0 (unsigned long *cc,
}
/* funky encoding for LSB of green */
- if (((lolo >> 1) & 1) != (((vec[1][GCOMP] ^ vec[0][GCOMP]) >> 2) & 1)) {
+ if ((int)((lolo >> 1) & 1) != (((vec[1][GCOMP] ^ vec[0][GCOMP]) >> 2) & 1)) {
for (i = 0; i < n_comp; i++) {
vec[1][i] = input[minColL][i];
vec[0][i] = input[maxColL][i];
@@ -1339,7 +1352,7 @@ fxt1_quantize_MIXED0 (unsigned long *cc,
}
/* funky encoding for LSB of green */
- if (((lohi >> 1) & 1) != (((vec[3][GCOMP] ^ vec[2][GCOMP]) >> 2) & 1)) {
+ if ((int)((lohi >> 1) & 1) != (((vec[3][GCOMP] ^ vec[2][GCOMP]) >> 2) & 1)) {
for (i = 0; i < n_comp; i++) {
vec[3][i] = input[minColR][i];
vec[2][i] = input[maxColR][i];
@@ -1455,6 +1468,8 @@ fxt1_encode (GLcontext *ctx,
unsigned long *encoded = dest;
GLubyte *newSource = NULL;
+ (void) ctx;
+
/*
* Rescale image if width is less than 8 or height is less than 4.
*/