From: Dave Airlie Date: Tue, 1 Mar 2011 23:52:53 +0000 (+1000) Subject: rgtc: fix fetch function limits for signed types X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff0f36f59d58e90e775117beb945ffbec7a5d7e2;p=mesa.git rgtc: fix fetch function limits for signed types --- 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; }