aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texfetch_tmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/texfetch_tmp.h')
-rw-r--r--mesalib/src/mesa/main/texfetch_tmp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesalib/src/mesa/main/texfetch_tmp.h b/mesalib/src/mesa/main/texfetch_tmp.h
index 40f56209f..9c2b36a02 100644
--- a/mesalib/src/mesa/main/texfetch_tmp.h
+++ b/mesalib/src/mesa/main/texfetch_tmp.h
@@ -837,7 +837,7 @@ static void store_texel_argb2101010(struct gl_texture_image *texImage,
{
const GLubyte *rgba = (const GLubyte *) texel;
GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
- *dst = PACK_COLOR_2101010(rgba[ACOMP], rgba[RCOMP], rgba[GCOMP], rgba[BCOMP]);
+ *dst = PACK_COLOR_2101010_UB(rgba[ACOMP], rgba[RCOMP], rgba[GCOMP], rgba[BCOMP]);
}
#endif
@@ -899,8 +899,8 @@ static void FETCH(f_al44)( const struct gl_texture_image *texImage,
const GLubyte s = *TEXEL_ADDR(GLubyte, texImage, i, j, k, 1);
texel[RCOMP] =
texel[GCOMP] =
- texel[BCOMP] = UBYTE_TO_FLOAT( (s & 0x0f) << 4 );
- texel[ACOMP] = UBYTE_TO_FLOAT( s & 0xf0 );
+ texel[BCOMP] = (s & 0xf) * (1.0F / 15.0F);
+ texel[ACOMP] = ((s >> 4) & 0xf) * (1.0F / 15.0F);
}
#if DIM == 3