diff options
author | Brian Paul <[email protected]> | 2013-01-02 09:00:36 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-01-02 09:02:04 -0700 |
commit | c7d3254b8e0bb0859c4ed969f07b4585af5577b7 (patch) | |
tree | df8509601ae4daa6ebe23b86dbccfbbed2d96c35 /src/mesa | |
parent | 955babf2d951514f9011e661a2f94f3937adbdc6 (diff) |
mesa: fix signed/unsignd mix-up in fetch_signed_l_latc1()
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=58844
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/texcompress_rgtc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/texcompress_rgtc.c b/src/mesa/main/texcompress_rgtc.c index fa9172aa282..1f8de25ec81 100644 --- a/src/mesa/main/texcompress_rgtc.c +++ b/src/mesa/main/texcompress_rgtc.c @@ -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); |