summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texcompress_fxt1.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-09-17 14:50:48 -0600
committerBrian Paul <brianp@vmware.com>2011-09-17 14:57:40 -0600
commita1661dc8957a35899d653e9fffd97f166c56be56 (patch)
tree0662287501323357f391c31dae72a01edd824ec3 /src/mesa/main/texcompress_fxt1.c
parent20177a620ef123ae7cdbc7252fd41a48f5b76acc (diff)
downloadexternal_mesa3d-a1661dc8957a35899d653e9fffd97f166c56be56.zip
external_mesa3d-a1661dc8957a35899d653e9fffd97f166c56be56.tar.gz
external_mesa3d-a1661dc8957a35899d653e9fffd97f166c56be56.tar.bz2
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/texcompress_fxt1.c')
-rw-r--r--src/mesa/main/texcompress_fxt1.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index bb7fb56..a75487c 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]);