summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-03-02 09:52:53 +1000
committerDave Airlie <airlied@redhat.com>2011-03-02 09:52:53 +1000
commitff0f36f59d58e90e775117beb945ffbec7a5d7e2 (patch)
treee707c153396f59024032a8f552a75136b3dd9887
parent8eebd216dd9f32de65e9af4160c042825ca75466 (diff)
rgtc: fix fetch function limits for signed types
-rw-r--r--src/mesa/main/texcompress_rgtc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/texcompress_rgtc.c b/src/mesa/main/texcompress_rgtc.c
index f6a1825216d..dcde4dd5a73 100644
--- a/src/mesa/main/texcompress_rgtc.c
+++ b/src/mesa/main/texcompress_rgtc.c
@@ -364,9 +364,9 @@ static void _fetch_texel_rgtc_s(GLint srcRowStride, const GLbyte *pixdata,
else if (code < 6)
decode = ((alpha0 * (6 - code) + (alpha1 * (code - 1))) / 5);
else if (code == 6)
- decode = -128;
+ decode = -127;
else
- decode = 127;
+ decode = 128;
*value = decode;
}