diff --git a/src/mesa/main/texcompress_rgtc.c b/src/mesa/main/texcompress_rgtc.c index a87493ec814..94c802170fd 100644 --- a/src/mesa/main/texcompress_rgtc.c +++ b/src/mesa/main/texcompress_rgtc.c @@ -49,7 +49,7 @@ static void extractsrc_u( GLubyte srcpixels[4][4], const GLubyte *srcaddr, GLint srcRowStride, GLint numxpixels, GLint numypixels, GLint comps) { - GLubyte i, j; + GLint i, j; const GLubyte *curaddr; for (j = 0; j < numypixels; j++) { curaddr = srcaddr + j * srcRowStride * comps; @@ -63,7 +63,7 @@ static void extractsrc_u( GLubyte srcpixels[4][4], const GLubyte *srcaddr, static void extractsrc_s( GLbyte srcpixels[4][4], const GLbyte *srcaddr, GLint srcRowStride, GLint numxpixels, GLint numypixels, GLint comps) { - GLubyte i, j; + GLint i, j; const GLbyte *curaddr; for (j = 0; j < numypixels; j++) { curaddr = srcaddr + j * srcRowStride * comps; diff --git a/src/util/format/texcompress_s3tc_tmp.h b/src/util/format/texcompress_s3tc_tmp.h index 79e1e55fd59..eb4ab460323 100644 --- a/src/util/format/texcompress_s3tc_tmp.h +++ b/src/util/format/texcompress_s3tc_tmp.h @@ -509,7 +509,7 @@ static void encodedxtcolorblockfaster( GLubyte *blkaddr, GLubyte srccolors[4][4] GLubyte *bestcolor[2]; GLubyte basecolors[2][3]; - GLubyte i, j; + GLint i, j; GLuint lowcv, highcv, testcv; GLboolean haveAlpha = GL_FALSE; @@ -570,7 +570,8 @@ static void encodedxt5alpha(GLubyte *blkaddr, GLubyte srccolors[4][4][4], GLubyte alphabase[2], alphause[2]; GLshort alphatest[2]; GLuint alphablockerror1, alphablockerror2, alphablockerror3; - GLubyte i, j, aindex, acutValues[7]; + GLint i, j; + GLubyte aindex, acutValues[7]; GLubyte alphaenc1[16], alphaenc2[16], alphaenc3[16]; GLboolean alphaabsmin = GL_FALSE; GLboolean alphaabsmax = GL_FALSE; @@ -889,7 +890,7 @@ static void encodedxt5alpha(GLubyte *blkaddr, GLubyte srccolors[4][4][4], static void extractsrccolors( GLubyte srcpixels[4][4][4], const GLchan *srcaddr, GLint srcRowStride, GLint numxpixels, GLint numypixels, GLint comps) { - GLubyte i, j, c; + GLint i, j, c; const GLchan *curaddr; for (j = 0; j < numypixels; j++) { curaddr = srcaddr + j * srcRowStride * comps; diff --git a/src/util/texcompress_rgtc_tmp.h b/src/util/texcompress_rgtc_tmp.h index 02566b12e7d..309db3cb82c 100644 --- a/src/util/texcompress_rgtc_tmp.h +++ b/src/util/texcompress_rgtc_tmp.h @@ -79,7 +79,8 @@ void TAG(encode_rgtc_ubyte)(TYPE *blkaddr, TYPE srccolors[4][4], TYPE alphabase[2], alphause[2]; short alphatest[2] = { 0 }; unsigned int alphablockerror1, alphablockerror2, alphablockerror3; - TYPE i, j, aindex, acutValues[7]; + int i, j; + TYPE aindex, acutValues[7]; TYPE alphaenc1[16], alphaenc2[16], alphaenc3[16]; int alphaabsmin = 0, alphaabsmax = 0; short alphadist;