mesa: fix signed/unsignd mix-up in fetch_signed_l_latc1()

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=58844
This commit is contained in:
Brian Paul 2013-01-02 09:00:36 -07:00
parent 955babf2d9
commit c7d3254b8e

View file

@ -364,9 +364,10 @@ fetch_signed_l_latc1(const GLubyte *map, const GLuint imageOffsets[],
GLint rowStride, GLint i, GLint j, GLint k,
GLfloat *texel)
{
GLubyte red;
GLbyte red;
GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
unsigned_fetch_texel_rgtc(rowStride, map + sliceOffset, i, j, &red, 1);
signed_fetch_texel_rgtc(rowStride, (GLbyte *) map + sliceOffset,
i, j, &red, 1);
texel[RCOMP] =
texel[GCOMP] =
texel[BCOMP] = BYTE_TO_FLOAT(red);