From 59cae3eee105b8522bc9b17cd60ad1e98b1e8825 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 2 Mar 2011 14:33:35 +1000 Subject: rgtc: remove GL types from this file. I'd like to share this file with gallium u_format stuff. Signed-off-by: Dave Airlie --- src/mesa/main/texcompress_rgtc_tmp.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/texcompress_rgtc_tmp.h b/src/mesa/main/texcompress_rgtc_tmp.h index 404f7fe3fd..c8bf082a15 100644 --- a/src/mesa/main/texcompress_rgtc_tmp.h +++ b/src/mesa/main/texcompress_rgtc_tmp.h @@ -72,26 +72,26 @@ static void TAG(write_rgtc_encoded_channel)(TYPE *blkaddr, *blkaddr++ = (alphaenc[10] >> 2) | (alphaenc[11] << 1) | (alphaenc[12] << 4) | ((alphaenc[13] & 1) << 7); *blkaddr++ = (alphaenc[13] >> 1) | (alphaenc[14] << 2) | (alphaenc[15] << 5); } + static void TAG(encode_rgtc_chan)(TYPE *blkaddr, TYPE srccolors[4][4], - GLint numxpixels, GLint numypixels) + int numxpixels, int numypixels) { TYPE alphabase[2], alphause[2]; - GLshort alphatest[2] = { 0 }; - GLuint alphablockerror1, alphablockerror2, alphablockerror3; + short alphatest[2] = { 0 }; + unsigned int alphablockerror1, alphablockerror2, alphablockerror3; TYPE i, j, aindex, acutValues[7]; TYPE alphaenc1[16], alphaenc2[16], alphaenc3[16]; - GLboolean alphaabsmin = GL_FALSE; - GLboolean alphaabsmax = GL_FALSE; - GLshort alphadist; + int alphaabsmin = 0, alphaabsmax = 0; + short alphadist; /* find lowest and highest alpha value in block, alphabase[0] lowest, alphabase[1] highest */ alphabase[0] = T_MAX; alphabase[1] = T_MIN; for (j = 0; j < numypixels; j++) { for (i = 0; i < numxpixels; i++) { if (srccolors[j][i] == T_MIN) - alphaabsmin = GL_TRUE; + alphaabsmin = 1; else if (srccolors[j][i] == T_MAX) - alphaabsmax = GL_TRUE; + alphaabsmax = 1; else { if (srccolors[j][i] > alphabase[1]) alphabase[1] = srccolors[j][i]; @@ -248,8 +248,8 @@ static void TAG(encode_rgtc_chan)(TYPE *blkaddr, TYPE srccolors[4][4], /* skip this if the error is already very small this encoding is MUCH better on average than #2 though, but expensive! */ if ((alphablockerror2 > 96) && (alphablockerror1 > 96)) { - GLshort blockerrlin1 = 0; - GLshort blockerrlin2 = 0; + short blockerrlin1 = 0; + short blockerrlin2 = 0; TYPE nralphainrangelow = 0; TYPE nralphainrangehigh = 0; alphatest[0] = T_MAX; -- cgit v1.2.3