From cd8b0d0de3fcb53f6d3ece8ce26d97aaab2c0914 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 12 Mar 2014 16:40:50 +0100 Subject: mesa xserver xkbcomp git update 12 Mar 2014 xserver commit 81a4952d3dcab9ca3a1ee399c773f5ac352036c4 xkbcomp commit d4e02a09258063c6d024c3ccd42d6b22212e6e18 mesa commit 2c886eba7820f7e3e965dd16b786b0a412d8ef11 --- mesalib/src/mesa/swrast/s_texfetch_tmp.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'mesalib/src/mesa/swrast/s_texfetch_tmp.h') diff --git a/mesalib/src/mesa/swrast/s_texfetch_tmp.h b/mesalib/src/mesa/swrast/s_texfetch_tmp.h index 8821125a0..f749b491f 100644 --- a/mesalib/src/mesa/swrast/s_texfetch_tmp.h +++ b/mesalib/src/mesa/swrast/s_texfetch_tmp.h @@ -1027,6 +1027,17 @@ static void FETCH(sabgr8)(const struct swrast_texture_image *texImage, } +/* Fetch texel from 1D, 2D or 3D sabgr8 texture, return 4 GLfloats */ +static void FETCH(sxbgr8)(const struct swrast_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel ) +{ + const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1); + texel[RCOMP] = nonlinear_to_linear( (s ) & 0xff ); + texel[GCOMP] = nonlinear_to_linear( (s >> 8) & 0xff ); + texel[BCOMP] = nonlinear_to_linear( (s >> 16) & 0xff ); + texel[ACOMP] = 1.0f; +} + /* Fetch texel from 1D, 2D or 3D sl8 texture, return 4 GLfloats */ static void FETCH(sl8)(const struct swrast_texture_image *texImage, @@ -1552,7 +1563,7 @@ static void FETCH(f_z24_s8)( const struct swrast_texture_image *texImage, const GLdouble scale = 1.0 / (GLdouble) 0xffffff; texel[0] = (GLfloat) (((*src) >> 8) * scale); ASSERT(texImage->Base.TexFormat == MESA_FORMAT_S8_UINT_Z24_UNORM || - texImage->Base.TexFormat == MESA_FORMAT_X8Z24_UNORM); + texImage->Base.TexFormat == MESA_FORMAT_X8_UINT_Z24_UNORM); ASSERT(texel[0] >= 0.0F); ASSERT(texel[0] <= 1.0F); } -- cgit v1.2.3