aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-09-17 14:50:48 -0600
committerBrian Paul <[email protected]>2011-09-17 14:57:40 -0600
commita1661dc8957a35899d653e9fffd97f166c56be56 (patch)
tree0662287501323357f391c31dae72a01edd824ec3 /src/mesa/main
parent20177a620ef123ae7cdbc7252fd41a48f5b76acc (diff)
mesa: move gl_texture_image::FetchTexel fields to swrast
This also involves passing swrast_texture_image instead of gl_texture_image into all the fetch functions.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/mtypes.h34
-rw-r--r--src/mesa/main/texcompress.c9
-rw-r--r--src/mesa/main/texcompress_fxt1.c9
-rw-r--r--src/mesa/main/texcompress_fxt1.h6
-rw-r--r--src/mesa/main/texcompress_rgtc.c42
-rw-r--r--src/mesa/main/texcompress_rgtc.h18
-rw-r--r--src/mesa/main/texcompress_s3tc.c39
-rw-r--r--src/mesa/main/texcompress_s3tc.h18
-rw-r--r--src/mesa/main/teximage.c2
9 files changed, 74 insertions, 103 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 8671ecda927..429c8b43075 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1253,37 +1253,6 @@ typedef enum
/**
- * Texel fetch function prototype. We use texel fetch functions to
- * extract RGBA, color indexes and depth components out of 1D, 2D and 3D
- * texture images. These functions help to isolate us from the gritty
- * details of all the various texture image encodings.
- *
- * \param texImage texture image.
- * \param col texel column.
- * \param row texel row.
- * \param img texel image level/layer.
- * \param texelOut output texel (up to 4 GLchans)
- */
-typedef void (*FetchTexelFuncC)( const struct gl_texture_image *texImage,
- GLint col, GLint row, GLint img,
- GLchan *texelOut );
-
-/**
- * As above, but returns floats.
- * Used for depth component images and for upcoming signed/float
- * texture images.
- */
-typedef void (*FetchTexelFuncF)( const struct gl_texture_image *texImage,
- GLint col, GLint row, GLint img,
- GLfloat *texelOut );
-
-
-typedef void (*StoreTexelFunc)(struct gl_texture_image *texImage,
- GLint col, GLint row, GLint img,
- const void *texel);
-
-
-/**
* Texture image state. Describes the dimensions of a texture image,
* the texel format and pointers to Texel Fetch functions.
*/
@@ -1320,9 +1289,6 @@ struct gl_texture_image
/** Cube map face: index into gl_texture_object::Image[] array */
GLuint Face;
- FetchTexelFuncC FetchTexelc; /**< GLchan texel fetch function pointer */
- FetchTexelFuncF FetchTexelf; /**< Float texel fetch function pointer */
-
GLuint RowStride; /**< Padded width in units of texels */
GLuint *ImageOffsets; /**< if 3D texture: array [Depth] of offsets to
each 2D slice in 'Data', in texels */
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index 4e5c14cbba2..b49d1b1ca1e 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -40,6 +40,7 @@
#include "texcompress_fxt1.h"
#include "texcompress_rgtc.h"
#include "texcompress_s3tc.h"
+#include "swrast/s_context.h"
/**
@@ -451,15 +452,15 @@ _mesa_decompress_image(gl_format format, GLuint width, GLuint height,
const GLubyte *src, GLint srcRowStride,
GLfloat *dest)
{
- void (*fetch)(const struct gl_texture_image *texImage,
+ void (*fetch)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
- struct gl_texture_image texImage; /* dummy teximage */
+ struct swrast_texture_image texImage; /* dummy teximage */
GLuint i, j;
/* setup dummy texture image info */
memset(&texImage, 0, sizeof(texImage));
- texImage.Data = (void *) src;
- texImage.RowStride = srcRowStride;
+ texImage.Base.Data = (void *) src;
+ texImage.Base.RowStride = srcRowStride;
switch (format) {
/* DXT formats */
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index bb7fb567f25..a75487ce29a 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -39,6 +39,7 @@
#include "texcompress.h"
#include "texcompress_fxt1.h"
#include "texstore.h"
+#include "swrast/s_context.h"
#if FEATURE_texture_fxt1
@@ -167,13 +168,13 @@ _mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS)
void
-_mesa_fetch_texel_2d_f_rgba_fxt1( const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rgba_fxt1( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
(void) k;
- fxt1_decode_1(texImage->Data, texImage->RowStride, i, j, rgba);
+ fxt1_decode_1(texImage->Base.Data, texImage->Base.RowStride, i, j, rgba);
texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
texel[BCOMP] = CHAN_TO_FLOAT(rgba[BCOMP]);
@@ -182,13 +183,13 @@ _mesa_fetch_texel_2d_f_rgba_fxt1( const struct gl_texture_image *texImage,
void
-_mesa_fetch_texel_2d_f_rgb_fxt1( const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rgb_fxt1( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
(void) k;
- fxt1_decode_1(texImage->Data, texImage->RowStride, i, j, rgba);
+ fxt1_decode_1(texImage->Base.Data, texImage->Base.RowStride, i, j, rgba);
texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
texel[BCOMP] = CHAN_TO_FLOAT(rgba[BCOMP]);
diff --git a/src/mesa/main/texcompress_fxt1.h b/src/mesa/main/texcompress_fxt1.h
index b991f4c67ec..bd84082e9ed 100644
--- a/src/mesa/main/texcompress_fxt1.h
+++ b/src/mesa/main/texcompress_fxt1.h
@@ -29,7 +29,7 @@
#include "mfeatures.h"
#include "texstore.h"
-struct gl_texture_image;
+struct swrast_texture_image;
#if FEATURE_texture_fxt1
@@ -40,11 +40,11 @@ extern GLboolean
_mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS);
extern void
-_mesa_fetch_texel_2d_f_rgba_fxt1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rgba_fxt1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_rgb_fxt1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rgb_fxt1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
#else /* FEATURE_texture_fxt1 */
diff --git a/src/mesa/main/texcompress_rgtc.c b/src/mesa/main/texcompress_rgtc.c
index d9de9bec3d1..7af3d676263 100644
--- a/src/mesa/main/texcompress_rgtc.c
+++ b/src/mesa/main/texcompress_rgtc.c
@@ -43,6 +43,8 @@
#include "texcompress.h"
#include "texcompress_rgtc.h"
#include "texstore.h"
+#include "swrast/s_context.h"
+
#define RGTC_DEBUG 0
@@ -323,11 +325,11 @@ _mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS)
}
void
-_mesa_fetch_texel_2d_f_red_rgtc1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_red_rgtc1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
GLubyte red;
- unsigned_fetch_texel_rgtc(texImage->RowStride, (GLubyte *)(texImage->Data),
+ unsigned_fetch_texel_rgtc(texImage->Base.RowStride, (GLubyte *)(texImage->Base.Data),
i, j, &red, 1);
texel[RCOMP] = UBYTE_TO_FLOAT(red);
texel[GCOMP] = 0.0;
@@ -336,11 +338,11 @@ _mesa_fetch_texel_2d_f_red_rgtc1(const struct gl_texture_image *texImage,
}
void
-_mesa_fetch_texel_2d_f_signed_red_rgtc1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_signed_red_rgtc1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
GLbyte red;
- signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data),
+ signed_fetch_texel_rgtc(texImage->Base.RowStride, (GLbyte *)(texImage->Base.Data),
i, j, &red, 1);
texel[RCOMP] = BYTE_TO_FLOAT_TEX(red);
texel[GCOMP] = 0.0;
@@ -349,13 +351,13 @@ _mesa_fetch_texel_2d_f_signed_red_rgtc1(const struct gl_texture_image *texImage,
}
void
-_mesa_fetch_texel_2d_f_rg_rgtc2(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rg_rgtc2(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
GLubyte red, green;
- unsigned_fetch_texel_rgtc(texImage->RowStride, (GLubyte *)(texImage->Data),
+ unsigned_fetch_texel_rgtc(texImage->Base.RowStride, (GLubyte *)(texImage->Base.Data),
i, j, &red, 2);
- unsigned_fetch_texel_rgtc(texImage->RowStride, (GLubyte *)(texImage->Data) + 8,
+ unsigned_fetch_texel_rgtc(texImage->Base.RowStride, (GLubyte *)(texImage->Base.Data) + 8,
i, j, &green, 2);
texel[RCOMP] = UBYTE_TO_FLOAT(red);
texel[GCOMP] = UBYTE_TO_FLOAT(green);
@@ -364,13 +366,13 @@ _mesa_fetch_texel_2d_f_rg_rgtc2(const struct gl_texture_image *texImage,
}
void
-_mesa_fetch_texel_2d_f_signed_rg_rgtc2(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_signed_rg_rgtc2(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
GLbyte red, green;
- signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data),
+ signed_fetch_texel_rgtc(texImage->Base.RowStride, (GLbyte *)(texImage->Base.Data),
i, j, &red, 2);
- signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data) + 8,
+ signed_fetch_texel_rgtc(texImage->Base.RowStride, (GLbyte *)(texImage->Base.Data) + 8,
i, j, &green, 2);
texel[RCOMP] = BYTE_TO_FLOAT_TEX(red);
texel[GCOMP] = BYTE_TO_FLOAT_TEX(green);
@@ -379,11 +381,11 @@ _mesa_fetch_texel_2d_f_signed_rg_rgtc2(const struct gl_texture_image *texImage,
}
void
-_mesa_fetch_texel_2d_f_l_latc1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_l_latc1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
GLubyte red;
- unsigned_fetch_texel_rgtc(texImage->RowStride, (GLubyte *)(texImage->Data),
+ unsigned_fetch_texel_rgtc(texImage->Base.RowStride, (GLubyte *)(texImage->Base.Data),
i, j, &red, 1);
texel[RCOMP] =
texel[GCOMP] =
@@ -392,11 +394,11 @@ _mesa_fetch_texel_2d_f_l_latc1(const struct gl_texture_image *texImage,
}
void
-_mesa_fetch_texel_2d_f_signed_l_latc1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_signed_l_latc1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
GLbyte red;
- signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data),
+ signed_fetch_texel_rgtc(texImage->Base.RowStride, (GLbyte *)(texImage->Base.Data),
i, j, &red, 1);
texel[RCOMP] =
texel[GCOMP] =
@@ -405,13 +407,13 @@ _mesa_fetch_texel_2d_f_signed_l_latc1(const struct gl_texture_image *texImage,
}
void
-_mesa_fetch_texel_2d_f_la_latc2(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_la_latc2(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
GLubyte red, green;
- unsigned_fetch_texel_rgtc(texImage->RowStride, (GLubyte *)(texImage->Data),
+ unsigned_fetch_texel_rgtc(texImage->Base.RowStride, (GLubyte *)(texImage->Base.Data),
i, j, &red, 2);
- unsigned_fetch_texel_rgtc(texImage->RowStride, (GLubyte *)(texImage->Data) + 8,
+ unsigned_fetch_texel_rgtc(texImage->Base.RowStride, (GLubyte *)(texImage->Base.Data) + 8,
i, j, &green, 2);
texel[RCOMP] =
texel[GCOMP] =
@@ -420,13 +422,13 @@ _mesa_fetch_texel_2d_f_la_latc2(const struct gl_texture_image *texImage,
}
void
-_mesa_fetch_texel_2d_f_signed_la_latc2(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_signed_la_latc2(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
GLbyte red, green;
- signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data),
+ signed_fetch_texel_rgtc(texImage->Base.RowStride, (GLbyte *)(texImage->Base.Data),
i, j, &red, 2);
- signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data) + 8,
+ signed_fetch_texel_rgtc(texImage->Base.RowStride, (GLbyte *)(texImage->Base.Data) + 8,
i, j, &green, 2);
texel[RCOMP] =
texel[GCOMP] =
diff --git a/src/mesa/main/texcompress_rgtc.h b/src/mesa/main/texcompress_rgtc.h
index 18766770d74..6be6ad9be41 100644
--- a/src/mesa/main/texcompress_rgtc.h
+++ b/src/mesa/main/texcompress_rgtc.h
@@ -28,7 +28,7 @@
#include "mfeatures.h"
#include "texstore.h"
-struct gl_texture_image;
+struct swrast_texture_image;
extern GLboolean
_mesa_texstore_red_rgtc1(TEXSTORE_PARAMS);
@@ -43,35 +43,35 @@ extern GLboolean
_mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS);
extern void
-_mesa_fetch_texel_2d_f_red_rgtc1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_red_rgtc1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_signed_red_rgtc1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_signed_red_rgtc1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_rg_rgtc2(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rg_rgtc2(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_signed_rg_rgtc2(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_signed_rg_rgtc2(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_l_latc1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_l_latc1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_signed_l_latc1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_signed_l_latc1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_la_latc2(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_la_latc2(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_signed_la_latc2(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_signed_la_latc2(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
#endif
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index 86f962e9890..36a56447ea0 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -44,6 +44,7 @@
#include "texcompress.h"
#include "texcompress_s3tc.h"
#include "texstore.h"
+#include "swrast/s_context.h"
#if FEATURE_texture_s3tc
@@ -388,14 +389,14 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
static void
-fetch_texel_2d_rgb_dxt1( const struct gl_texture_image *texImage,
+fetch_texel_2d_rgb_dxt1( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
(void) k;
if (fetch_ext_rgb_dxt1) {
ASSERT (sizeof(GLchan) == sizeof(GLubyte));
- fetch_ext_rgb_dxt1(texImage->RowStride,
- (GLubyte *)(texImage)->Data, i, j, texel);
+ fetch_ext_rgb_dxt1(texImage->Base.RowStride,
+ (GLubyte *)(texImage)->Base.Data, i, j, texel);
}
else
_mesa_debug(NULL, "attempted to decode s3tc texture without library available: fetch_texel_2d_rgb_dxt1");
@@ -403,7 +404,7 @@ fetch_texel_2d_rgb_dxt1( const struct gl_texture_image *texImage,
void
-_mesa_fetch_texel_2d_f_rgb_dxt1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rgb_dxt1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
@@ -417,13 +418,13 @@ _mesa_fetch_texel_2d_f_rgb_dxt1(const struct gl_texture_image *texImage,
static void
-fetch_texel_2d_rgba_dxt1( const struct gl_texture_image *texImage,
+fetch_texel_2d_rgba_dxt1( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
(void) k;
if (fetch_ext_rgba_dxt1) {
- fetch_ext_rgba_dxt1(texImage->RowStride,
- (GLubyte *)(texImage)->Data, i, j, texel);
+ fetch_ext_rgba_dxt1(texImage->Base.RowStride,
+ (GLubyte *)(texImage)->Base.Data, i, j, texel);
}
else
_mesa_debug(NULL, "attempted to decode s3tc texture without library available: fetch_texel_2d_rgba_dxt1\n");
@@ -431,7 +432,7 @@ fetch_texel_2d_rgba_dxt1( const struct gl_texture_image *texImage,
void
-_mesa_fetch_texel_2d_f_rgba_dxt1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rgba_dxt1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
@@ -445,13 +446,14 @@ _mesa_fetch_texel_2d_f_rgba_dxt1(const struct gl_texture_image *texImage,
static void
-fetch_texel_2d_rgba_dxt3( const struct gl_texture_image *texImage,
+fetch_texel_2d_rgba_dxt3( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
(void) k;
if (fetch_ext_rgba_dxt3) {
ASSERT (sizeof(GLchan) == sizeof(GLubyte));
- fetch_ext_rgba_dxt3(texImage->RowStride, (GLubyte *)(texImage)->Data,
+ fetch_ext_rgba_dxt3(texImage->Base.RowStride,
+ (GLubyte *)(texImage)->Base.Data,
i, j, texel);
}
else
@@ -460,7 +462,7 @@ fetch_texel_2d_rgba_dxt3( const struct gl_texture_image *texImage,
void
-_mesa_fetch_texel_2d_f_rgba_dxt3(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rgba_dxt3(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
@@ -474,12 +476,13 @@ _mesa_fetch_texel_2d_f_rgba_dxt3(const struct gl_texture_image *texImage,
static void
-fetch_texel_2d_rgba_dxt5( const struct gl_texture_image *texImage,
+fetch_texel_2d_rgba_dxt5( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
(void) k;
if (fetch_ext_rgba_dxt5) {
- fetch_ext_rgba_dxt5(texImage->RowStride, (GLubyte *)(texImage)->Data,
+ fetch_ext_rgba_dxt5(texImage->Base.RowStride,
+ (GLubyte *)(texImage)->Base.Data,
i, j, texel);
}
else
@@ -488,7 +491,7 @@ fetch_texel_2d_rgba_dxt5( const struct gl_texture_image *texImage,
void
-_mesa_fetch_texel_2d_f_rgba_dxt5(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rgba_dxt5(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
@@ -502,7 +505,7 @@ _mesa_fetch_texel_2d_f_rgba_dxt5(const struct gl_texture_image *texImage,
#if FEATURE_EXT_texture_sRGB
void
-_mesa_fetch_texel_2d_f_srgb_dxt1( const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_srgb_dxt1( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
/* just sample as GLchan and convert to float here */
@@ -515,7 +518,7 @@ _mesa_fetch_texel_2d_f_srgb_dxt1( const struct gl_texture_image *texImage,
}
void
-_mesa_fetch_texel_2d_f_srgba_dxt1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_srgba_dxt1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
@@ -528,7 +531,7 @@ _mesa_fetch_texel_2d_f_srgba_dxt1(const struct gl_texture_image *texImage,
}
void
-_mesa_fetch_texel_2d_f_srgba_dxt3(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_srgba_dxt3(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
@@ -541,7 +544,7 @@ _mesa_fetch_texel_2d_f_srgba_dxt3(const struct gl_texture_image *texImage,
}
void
-_mesa_fetch_texel_2d_f_srgba_dxt5(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_srgba_dxt5(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
diff --git a/src/mesa/main/texcompress_s3tc.h b/src/mesa/main/texcompress_s3tc.h
index 74a0343b9b9..709c35ae74f 100644
--- a/src/mesa/main/texcompress_s3tc.h
+++ b/src/mesa/main/texcompress_s3tc.h
@@ -31,7 +31,7 @@
#include "texstore.h"
struct gl_context;
-struct gl_texture_image;
+struct swrast_texture_image;
#if FEATURE_texture_s3tc
@@ -48,35 +48,35 @@ extern GLboolean
_mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS);
extern void
-_mesa_fetch_texel_2d_f_rgb_dxt1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rgb_dxt1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_rgba_dxt1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rgba_dxt1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_rgba_dxt3(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rgba_dxt3(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_rgba_dxt5(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_rgba_dxt5(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_srgb_dxt1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_srgb_dxt1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_srgba_dxt1(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_srgba_dxt1(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_srgba_dxt3(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_srgba_dxt3(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_fetch_texel_2d_f_srgba_dxt5(const struct gl_texture_image *texImage,
+_mesa_fetch_texel_2d_f_srgba_dxt5(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 2973b6de3a3..6113b2e9e79 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1076,8 +1076,6 @@ clear_teximage_fields(struct gl_texture_image *img)
img->DepthLog2 = 0;
img->Data = NULL;
img->TexFormat = MESA_FORMAT_NONE;
- img->FetchTexelc = NULL;
- img->FetchTexelf = NULL;
}