diff options
Diffstat (limited to 'src/mesa/main/texcompress_rgtc.c')
-rw-r--r-- | src/mesa/main/texcompress_rgtc.c | 42 |
1 files changed, 22 insertions, 20 deletions
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] = |