diff options
Diffstat (limited to 'mesalib/src/mesa/main/texcompress_s3tc.c')
-rw-r--r-- | mesalib/src/mesa/main/texcompress_s3tc.c | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/mesalib/src/mesa/main/texcompress_s3tc.c b/mesalib/src/mesa/main/texcompress_s3tc.c index 86f962e98..36a56447e 100644 --- a/mesalib/src/mesa/main/texcompress_s3tc.c +++ b/mesalib/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 */ |