X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=inline;f=src%2Fmesa%2Fmain%2Ftexcompress_rgtc_tmp.h;h=5fa9de630b6f7ff9ce399124ecc270bc7977a25e;hb=2b6711cc5fbb06620f46d3a42823bf03b58e9e34;hp=48bbd374e08b18c6ee8eedf3e5ce618cf49344ae;hpb=f8e6d19f3f40931be741b44d3edf210c38e13f0f;p=mesa.git diff --git a/src/mesa/main/texcompress_rgtc_tmp.h b/src/mesa/main/texcompress_rgtc_tmp.h index 48bbd374e08..5fa9de630b6 100644 --- a/src/mesa/main/texcompress_rgtc_tmp.h +++ b/src/mesa/main/texcompress_rgtc_tmp.h @@ -37,9 +37,9 @@ static void TAG(fetch_texel_rgtc)(unsigned srcRowStride, const TYPE *pixdata, const TYPE alpha0 = blksrc[0]; const TYPE alpha1 = blksrc[1]; const char bit_pos = ((j&3) * 4 + (i&3)) * 3; - const TYPE acodelow = blksrc[2 + bit_pos / 8]; - const TYPE acodehigh = (3 + bit_pos / 8) < 8 ? blksrc[3 + bit_pos / 8] : 0; - const TYPE code = (acodelow >> (bit_pos & 0x7) | + const unsigned char acodelow = blksrc[2 + bit_pos / 8]; + const unsigned char acodehigh = (3 + bit_pos / 8) < 8 ? blksrc[3 + bit_pos / 8] : 0; + const unsigned char code = (acodelow >> (bit_pos & 0x7) | (acodehigh << (8 - (bit_pos & 0x7)))) & 0x7; if (code == 0) @@ -73,7 +73,7 @@ static void TAG(write_rgtc_encoded_channel)(TYPE *blkaddr, *blkaddr++ = (alphaenc[13] >> 1) | (alphaenc[14] << 2) | (alphaenc[15] << 5); } -static void TAG(encode_rgtc_chan)(TYPE *blkaddr, TYPE srccolors[4][4], +static void TAG(encode_rgtc_ubyte)(TYPE *blkaddr, TYPE srccolors[4][4], int numxpixels, int numypixels) { TYPE alphabase[2], alphause[2];