diff options
author | marha <marha@users.sourceforge.net> | 2011-12-05 07:42:31 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-12-05 07:42:31 +0100 |
commit | 528f5bd58a139174170c4130c67dca30193c9057 (patch) | |
tree | 550c818095dbc607deaddf166c77116ccd91ef54 /mesalib/src/mesa/swrast | |
parent | 2cfebffb491807a465a8e5f7daca582d8aefb829 (diff) | |
download | vcxsrv-528f5bd58a139174170c4130c67dca30193c9057.tar.gz vcxsrv-528f5bd58a139174170c4130c67dca30193c9057.tar.bz2 vcxsrv-528f5bd58a139174170c4130c67dca30193c9057.zip |
xserver xkeyboard-config mesa git update 5 dec 2011
Diffstat (limited to 'mesalib/src/mesa/swrast')
-rw-r--r-- | mesalib/src/mesa/swrast/s_texfetch.c | 25 | ||||
-rw-r--r-- | mesalib/src/mesa/swrast/s_texfetch_tmp.h | 18 | ||||
-rw-r--r-- | mesalib/src/mesa/swrast/s_texfilter.c | 9 |
3 files changed, 35 insertions, 17 deletions
diff --git a/mesalib/src/mesa/swrast/s_texfetch.c b/mesalib/src/mesa/swrast/s_texfetch.c index bcd63b602..7cb6e68b1 100644 --- a/mesalib/src/mesa/swrast/s_texfetch.c +++ b/mesalib/src/mesa/swrast/s_texfetch.c @@ -39,6 +39,7 @@ #include "main/texcompress_fxt1.h" #include "main/texcompress_s3tc.h" #include "main/texcompress_rgtc.h" +#include "main/texcompress_etc.h" #include "main/teximage.h" #include "s_context.h" #include "s_texfetch.h" @@ -361,6 +362,13 @@ texfetch_funcs[MESA_FORMAT_COUNT] = store_texel_r8, }, { + MESA_FORMAT_GR88, + fetch_texel_1d_f_gr88, + fetch_texel_2d_f_gr88, + fetch_texel_3d_f_gr88, + store_texel_gr88, + }, + { MESA_FORMAT_RG88, fetch_texel_1d_f_rg88, fetch_texel_2d_f_rg88, @@ -368,13 +376,6 @@ texfetch_funcs[MESA_FORMAT_COUNT] = store_texel_rg88, }, { - MESA_FORMAT_RG88_REV, - fetch_texel_1d_f_rg88_rev, - fetch_texel_2d_f_rg88_rev, - fetch_texel_3d_f_rg88_rev, - store_texel_rg88_rev, - }, - { MESA_FORMAT_R16, fetch_texel_1d_f_r16, fetch_texel_2d_f_r16, @@ -1178,6 +1179,13 @@ texfetch_funcs[MESA_FORMAT_COUNT] = NULL }, { + MESA_FORMAT_ETC1_RGB8, + NULL, + _mesa_fetch_texel_2d_f_etc1_rgb8, + NULL, + NULL + }, + { MESA_FORMAT_SIGNED_A8, fetch_texel_1d_signed_a8, fetch_texel_2d_signed_a8, @@ -1282,7 +1290,8 @@ _mesa_get_texel_fetch_func(gl_format format, GLuint dims) } #endif - assert(Elements(texfetch_funcs) == MESA_FORMAT_COUNT); + STATIC_ASSERT(Elements(texfetch_funcs) == MESA_FORMAT_COUNT); + assert(format < MESA_FORMAT_COUNT); switch (dims) { diff --git a/mesalib/src/mesa/swrast/s_texfetch_tmp.h b/mesalib/src/mesa/swrast/s_texfetch_tmp.h index 4ee05a5ea..e9512b561 100644 --- a/mesalib/src/mesa/swrast/s_texfetch_tmp.h +++ b/mesalib/src/mesa/swrast/s_texfetch_tmp.h @@ -1007,10 +1007,10 @@ static void store_texel_argb2101010(struct swrast_texture_image *texImage, #endif -/* MESA_FORMAT_RG88 **********************************************************/ +/* MESA_FORMAT_GR88 **********************************************************/ /* Fetch texel from 1D, 2D or 3D rg88 texture, return 4 GLchans */ -static void FETCH(f_rg88)( const struct swrast_texture_image *texImage, +static void FETCH(f_gr88)( const struct swrast_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel ) { const GLushort s = *TEXEL_ADDR(GLushort, texImage, i, j, k, 1); @@ -1021,7 +1021,7 @@ static void FETCH(f_rg88)( const struct swrast_texture_image *texImage, } #if DIM == 3 -static void store_texel_rg88(struct swrast_texture_image *texImage, +static void store_texel_gr88(struct swrast_texture_image *texImage, GLint i, GLint j, GLint k, const void *texel) { const GLchan *rgba = (const GLchan *) texel; @@ -1033,26 +1033,26 @@ static void store_texel_rg88(struct swrast_texture_image *texImage, #endif -/* MESA_FORMAT_RG88_REV ******************************************************/ +/* MESA_FORMAT_RG88 ******************************************************/ /* Fetch texel from 1D, 2D or 3D rg88_rev texture, return 4 GLchans */ -static void FETCH(f_rg88_rev)( const struct swrast_texture_image *texImage, +static void FETCH(f_rg88)( const struct swrast_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel ) { const GLushort s = *TEXEL_ADDR(GLushort, texImage, i, j, k, 1); - texel[RCOMP] = UBYTE_TO_FLOAT( s & 0xff ); - texel[GCOMP] = UBYTE_TO_FLOAT( s >> 8 ); + texel[RCOMP] = UBYTE_TO_FLOAT( s >> 8 ); + texel[GCOMP] = UBYTE_TO_FLOAT( s & 0xff ); texel[BCOMP] = 0.0; texel[ACOMP] = 1.0; } #if DIM == 3 -static void store_texel_rg88_rev(struct swrast_texture_image *texImage, +static void store_texel_rg88(struct swrast_texture_image *texImage, GLint i, GLint j, GLint k, const void *texel) { const GLubyte *rgba = (const GLubyte *) texel; GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 1); - *dst = PACK_COLOR_88(rgba[GCOMP], rgba[RCOMP]); + *dst = PACK_COLOR_88(rgba[RCOMP], rgba[GCOMP]); } #endif diff --git a/mesalib/src/mesa/swrast/s_texfilter.c b/mesalib/src/mesa/swrast/s_texfilter.c index 566262557..fb172f3a8 100644 --- a/mesalib/src/mesa/swrast/s_texfilter.c +++ b/mesalib/src/mesa/swrast/s_texfilter.c @@ -273,6 +273,7 @@ linear_texel_locations(GLenum wrapMode, default: _mesa_problem(NULL, "Bad wrap mode"); u = 0.0F; + break; } *weight = FRAC(u); } @@ -471,6 +472,7 @@ clamp_rect_coord_linear(GLenum wrapMode, GLfloat coord, GLint max, _mesa_problem(NULL, "bad wrapMode in clamp_rect_coord_linear"); i0 = i1 = 0; fcol = 0.0F; + break; } *i0out = i0; *i1out = i1; @@ -533,6 +535,7 @@ nearest_texcoord(const struct gl_texture_object *texObj, break; default: *i = *j = *k = 0; + break; } } @@ -589,6 +592,7 @@ linear_texcoord(const struct gl_texture_object *texObj, default: *slice = 0; + break; } } @@ -787,6 +791,7 @@ get_border_color(const struct gl_texture_object *tObj, break; default: COPY_4V(rgba, tObj->Sampler.BorderColor.f); + break; } } @@ -1537,6 +1542,7 @@ sample_lambda_2d(struct gl_context *ctx, break; default: _mesa_problem(ctx, "Bad mag filter in sample_lambda_2d"); + break; } } } @@ -2528,6 +2534,7 @@ sample_lambda_cube(struct gl_context *ctx, break; default: _mesa_problem(ctx, "Bad min filter in sample_lambda_cube"); + break; } } @@ -2545,6 +2552,7 @@ sample_lambda_cube(struct gl_context *ctx, break; default: _mesa_problem(ctx, "Bad mag filter in sample_lambda_cube"); + break; } } } @@ -3473,6 +3481,7 @@ sample_depth_texture( struct gl_context *ctx, break; default: _mesa_problem(ctx, "Bad depth texture mode"); + break; } } } |