aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texcompress_rgtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/texcompress_rgtc.c')
-rw-r--r--mesalib/src/mesa/main/texcompress_rgtc.c71
1 files changed, 28 insertions, 43 deletions
diff --git a/mesalib/src/mesa/main/texcompress_rgtc.c b/mesalib/src/mesa/main/texcompress_rgtc.c
index 1f8de25ec..7afd8ffa7 100644
--- a/mesalib/src/mesa/main/texcompress_rgtc.c
+++ b/mesalib/src/mesa/main/texcompress_rgtc.c
@@ -38,7 +38,6 @@
#include "colormac.h"
#include "image.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mipmap.h"
#include "texcompress.h"
#include "texcompress_rgtc.h"
@@ -319,12 +318,11 @@ _mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS)
static void
-fetch_red_rgtc1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_red_rgtc1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLubyte red;
- GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
- unsigned_fetch_texel_rgtc(rowStride, map + sliceOffset, i, j, &red, 1);
+ unsigned_fetch_texel_rgtc(rowStride, map, i, j, &red, 1);
texel[RCOMP] = UBYTE_TO_FLOAT(red);
texel[GCOMP] = 0.0;
texel[BCOMP] = 0.0;
@@ -332,12 +330,11 @@ fetch_red_rgtc1(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_l_latc1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_l_latc1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLubyte red;
- GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
- unsigned_fetch_texel_rgtc(rowStride, map + sliceOffset, i, j, &red, 1);
+ unsigned_fetch_texel_rgtc(rowStride, map, i, j, &red, 1);
texel[RCOMP] =
texel[GCOMP] =
texel[BCOMP] = UBYTE_TO_FLOAT(red);
@@ -345,13 +342,11 @@ fetch_l_latc1(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_signed_red_rgtc1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_signed_red_rgtc1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLbyte red;
- GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
- signed_fetch_texel_rgtc(rowStride, (const GLbyte *) map + sliceOffset,
+ signed_fetch_texel_rgtc(rowStride, (const GLbyte *) map,
i, j, &red, 1);
texel[RCOMP] = BYTE_TO_FLOAT_TEX(red);
texel[GCOMP] = 0.0;
@@ -360,13 +355,11 @@ fetch_signed_red_rgtc1(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_signed_l_latc1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_signed_l_latc1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLbyte red;
- GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
- signed_fetch_texel_rgtc(rowStride, (GLbyte *) map + sliceOffset,
+ signed_fetch_texel_rgtc(rowStride, (GLbyte *) map,
i, j, &red, 1);
texel[RCOMP] =
texel[GCOMP] =
@@ -375,17 +368,15 @@ fetch_signed_l_latc1(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_rg_rgtc2(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_rg_rgtc2(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLubyte red, green;
- GLuint sliceOffset = k ? imageOffsets[k] : 0;
unsigned_fetch_texel_rgtc(rowStride,
- map + sliceOffset,
+ map,
i, j, &red, 2);
unsigned_fetch_texel_rgtc(rowStride,
- map + sliceOffset + 8,
+ map + 8,
i, j, &green, 2);
texel[RCOMP] = UBYTE_TO_FLOAT(red);
texel[GCOMP] = UBYTE_TO_FLOAT(green);
@@ -394,17 +385,15 @@ fetch_rg_rgtc2(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_la_latc2(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_la_latc2(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLubyte red, green;
- GLuint sliceOffset = k ? imageOffsets[k] : 0;
unsigned_fetch_texel_rgtc(rowStride,
- map + sliceOffset,
+ map,
i, j, &red, 2);
unsigned_fetch_texel_rgtc(rowStride,
- map + sliceOffset + 8,
+ map + 8,
i, j, &green, 2);
texel[RCOMP] =
texel[GCOMP] =
@@ -414,17 +403,15 @@ fetch_la_latc2(const GLubyte *map, const GLuint imageOffsets[],
static void
-fetch_signed_rg_rgtc2(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_signed_rg_rgtc2(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLbyte red, green;
- GLuint sliceOffset = k ? imageOffsets[k] : 0;
signed_fetch_texel_rgtc(rowStride,
- (GLbyte *) map + sliceOffset,
+ (GLbyte *) map,
i, j, &red, 2);
signed_fetch_texel_rgtc(rowStride,
- (GLbyte *) map + sliceOffset + 8,
+ (GLbyte *) map + 8,
i, j, &green, 2);
texel[RCOMP] = BYTE_TO_FLOAT_TEX(red);
texel[GCOMP] = BYTE_TO_FLOAT_TEX(green);
@@ -434,17 +421,15 @@ fetch_signed_rg_rgtc2(const GLubyte *map, const GLuint imageOffsets[],
static void
-fetch_signed_la_latc2(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_signed_la_latc2(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLbyte red, green;
- GLuint sliceOffset = k ? imageOffsets[k] : 0;
signed_fetch_texel_rgtc(rowStride,
- (GLbyte *) map + sliceOffset,
+ (GLbyte *) map,
i, j, &red, 2);
signed_fetch_texel_rgtc(rowStride,
- (GLbyte *) map + sliceOffset + 8,
+ (GLbyte *) map + 8,
i, j, &green, 2);
texel[RCOMP] =
texel[GCOMP] =