aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_texfetch_tmp.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-12 16:40:50 +0100
committermarha <marha@users.sourceforge.net>2014-03-12 16:40:50 +0100
commitcd8b0d0de3fcb53f6d3ece8ce26d97aaab2c0914 (patch)
treec0863bb0ad967459374ace6668bf2e80e1f9b004 /mesalib/src/mesa/swrast/s_texfetch_tmp.h
parent3dd4b6420f686b0147d5b8136268cc63196e253b (diff)
downloadvcxsrv-cd8b0d0de3fcb53f6d3ece8ce26d97aaab2c0914.tar.gz
vcxsrv-cd8b0d0de3fcb53f6d3ece8ce26d97aaab2c0914.tar.bz2
vcxsrv-cd8b0d0de3fcb53f6d3ece8ce26d97aaab2c0914.zip
mesa xserver xkbcomp git update 12 Mar 2014
xserver commit 81a4952d3dcab9ca3a1ee399c773f5ac352036c4 xkbcomp commit d4e02a09258063c6d024c3ccd42d6b22212e6e18 mesa commit 2c886eba7820f7e3e965dd16b786b0a412d8ef11
Diffstat (limited to 'mesalib/src/mesa/swrast/s_texfetch_tmp.h')
-rw-r--r--mesalib/src/mesa/swrast/s_texfetch_tmp.h13
1 files changed, 12 insertions, 1 deletions
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);
}