summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texcompress_rgtc.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-09-17 15:47:03 -0600
committerBrian Paul <brianp@vmware.com>2011-09-20 20:17:41 -0600
commitb4e6afbf7715df7473723f3e0c5d714cd5721802 (patch)
tree73b78e209799797a440f8e90d3508ab0d8da5a4d /src/mesa/main/texcompress_rgtc.c
parent960694fd2dbf1b40af2c4125145e42b3914f4b9f (diff)
downloadexternal_mesa3d-b4e6afbf7715df7473723f3e0c5d714cd5721802.zip
external_mesa3d-b4e6afbf7715df7473723f3e0c5d714cd5721802.tar.gz
external_mesa3d-b4e6afbf7715df7473723f3e0c5d714cd5721802.tar.bz2
mesa/gallium: remove GLchan from latc, rgtc code
Diffstat (limited to 'src/mesa/main/texcompress_rgtc.c')
-rw-r--r--src/mesa/main/texcompress_rgtc.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/main/texcompress_rgtc.c b/src/mesa/main/texcompress_rgtc.c
index f18a966..398f612 100644
--- a/src/mesa/main/texcompress_rgtc.c
+++ b/src/mesa/main/texcompress_rgtc.c
@@ -48,9 +48,9 @@
#define RGTC_DEBUG 0
-static void unsigned_encode_rgtc_chan(GLubyte *blkaddr, GLubyte srccolors[4][4],
+static void unsigned_encode_rgtc_ubyte(GLubyte *blkaddr, GLubyte srccolors[4][4],
GLint numxpixels, GLint numypixels);
-static void signed_encode_rgtc_chan(GLbyte *blkaddr, GLbyte srccolors[4][4],
+static void signed_encode_rgtc_ubyte(GLbyte *blkaddr, GLbyte srccolors[4][4],
GLint numxpixels, GLint numypixels);
static void unsigned_fetch_texel_rgtc(unsigned srcRowStride, const GLubyte *pixdata,
@@ -59,15 +59,15 @@ static void unsigned_fetch_texel_rgtc(unsigned srcRowStride, const GLubyte *pixd
static void signed_fetch_texel_rgtc(unsigned srcRowStride, const GLbyte *pixdata,
unsigned i, unsigned j, GLbyte *value, unsigned comps);
-static void extractsrc_u( GLubyte srcpixels[4][4], const GLchan *srcaddr,
+static void extractsrc_u( GLubyte srcpixels[4][4], const GLubyte *srcaddr,
GLint srcRowStride, GLint numxpixels, GLint numypixels, GLint comps)
{
GLubyte i, j;
- const GLchan *curaddr;
+ const GLubyte *curaddr;
for (j = 0; j < numypixels; j++) {
curaddr = srcaddr + j * srcRowStride * comps;
for (i = 0; i < numxpixels; i++) {
- srcpixels[j][i] = *curaddr / (CHAN_MAX / 255);
+ srcpixels[j][i] = *curaddr;
curaddr += comps;
}
}
@@ -96,7 +96,7 @@ _mesa_texstore_red_rgtc1(TEXSTORE_PARAMS)
const GLubyte *tempImage = NULL;
int i, j;
int numxpixels, numypixels;
- const GLchan *srcaddr;
+ const GLubyte *srcaddr;
GLubyte srcpixels[4][4];
GLubyte *blkaddr;
GLint dstRowDiff;
@@ -132,7 +132,7 @@ _mesa_texstore_red_rgtc1(TEXSTORE_PARAMS)
if (srcWidth > i + 3) numxpixels = 4;
else numxpixels = srcWidth - i;
extractsrc_u(srcpixels, srcaddr, srcWidth, numxpixels, numypixels, 1);
- unsigned_encode_rgtc_chan(blkaddr, srcpixels, numxpixels, numypixels);
+ unsigned_encode_rgtc_ubyte(blkaddr, srcpixels, numxpixels, numypixels);
srcaddr += numxpixels;
blkaddr += 8;
}
@@ -187,7 +187,7 @@ _mesa_texstore_signed_red_rgtc1(TEXSTORE_PARAMS)
if (srcWidth > i + 3) numxpixels = 4;
else numxpixels = srcWidth - i;
extractsrc_s(srcpixels, srcaddr, srcWidth, numxpixels, numypixels, 1);
- signed_encode_rgtc_chan(blkaddr, srcpixels, numxpixels, numypixels);
+ signed_encode_rgtc_ubyte(blkaddr, srcpixels, numxpixels, numypixels);
srcaddr += numxpixels;
blkaddr += 8;
}
@@ -207,7 +207,7 @@ _mesa_texstore_rg_rgtc2(TEXSTORE_PARAMS)
const GLubyte *tempImage = NULL;
int i, j;
int numxpixels, numypixels;
- const GLchan *srcaddr;
+ const GLubyte *srcaddr;
GLubyte srcpixels[4][4];
GLubyte *blkaddr;
GLint dstRowDiff;
@@ -243,11 +243,11 @@ _mesa_texstore_rg_rgtc2(TEXSTORE_PARAMS)
if (srcWidth > i + 3) numxpixels = 4;
else numxpixels = srcWidth - i;
extractsrc_u(srcpixels, srcaddr, srcWidth, numxpixels, numypixels, 2);
- unsigned_encode_rgtc_chan(blkaddr, srcpixels, numxpixels, numypixels);
+ unsigned_encode_rgtc_ubyte(blkaddr, srcpixels, numxpixels, numypixels);
blkaddr += 8;
- extractsrc_u(srcpixels, (GLchan *)srcaddr + 1, srcWidth, numxpixels, numypixels, 2);
- unsigned_encode_rgtc_chan(blkaddr, srcpixels, numxpixels, numypixels);
+ extractsrc_u(srcpixels, (GLubyte *)srcaddr + 1, srcWidth, numxpixels, numypixels, 2);
+ unsigned_encode_rgtc_ubyte(blkaddr, srcpixels, numxpixels, numypixels);
blkaddr += 8;
@@ -306,11 +306,11 @@ _mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS)
else numxpixels = srcWidth - i;
extractsrc_s(srcpixels, srcaddr, srcWidth, numxpixels, numypixels, 2);
- signed_encode_rgtc_chan(blkaddr, srcpixels, numxpixels, numypixels);
+ signed_encode_rgtc_ubyte(blkaddr, srcpixels, numxpixels, numypixels);
blkaddr += 8;
extractsrc_s(srcpixels, srcaddr + 1, srcWidth, numxpixels, numypixels, 2);
- signed_encode_rgtc_chan(blkaddr, srcpixels, numxpixels, numypixels);
+ signed_encode_rgtc_ubyte(blkaddr, srcpixels, numxpixels, numypixels);
blkaddr += 8;
srcaddr += numxpixels * 2;