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:45:42 +0100
committermarha <marha@users.sourceforge.net>2014-03-12 16:45:42 +0100
commitcc6db22a772cc52ead6a5c11d7d02e7364f6326c (patch)
treed80b42172d703ec20ccd99c68a067505e2706899 /mesalib/src/mesa/swrast/s_texfetch_tmp.h
parent2112b7dec49833ba872bd3ebcd7288930fec0796 (diff)
parentcd8b0d0de3fcb53f6d3ece8ce26d97aaab2c0914 (diff)
downloadvcxsrv-cc6db22a772cc52ead6a5c11d7d02e7364f6326c.tar.gz
vcxsrv-cc6db22a772cc52ead6a5c11d7d02e7364f6326c.tar.bz2
vcxsrv-cc6db22a772cc52ead6a5c11d7d02e7364f6326c.zip
Merge remote-tracking branch 'origin/released'
* origin/released: mesa xserver xkbcomp git update 12 Mar 2014
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);
}