swrast: fix more store_texel() bugs

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40412 on swrast.
This commit is contained in:
Brian Paul
2011-09-13 13:30:17 -06:00
parent 6dd284f7c8
commit 63b5902756
+4 -4
View File
@@ -1343,9 +1343,9 @@ static void FETCH(f_l16)( const struct swrast_texture_image *texImage,
static void store_texel_l16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLushort *rgba = (const GLushort *) texel;
const GLchan *rgba = (const GLchan *) texel;
GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
*dst = rgba[RCOMP];
*dst = CHAN_TO_USHORT(rgba[RCOMP]);
}
#endif
@@ -1391,9 +1391,9 @@ static void FETCH(f_i16)( const struct swrast_texture_image *texImage,
static void store_texel_i16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLushort *rgba = (const GLushort *) texel;
const GLchan *rgba = (const GLchan *) texel;
GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
*dst = rgba[RCOMP];
*dst = CHAN_TO_USHORT(rgba[RCOMP]);
}
#endif