diff options
author | Dave Airlie <[email protected]> | 2011-03-02 14:08:59 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-03-02 14:08:59 +1000 |
commit | fb6ecca0a556dcca1f77bfb84a835e2b9c2e2e6a (patch) | |
tree | cc02ac6cbacdf9b2f848854db77325811f18cd47 /src/mesa/main/texcompress_rgtc.c | |
parent | 521394a204bd8073846acc7f9861081d29fa24c9 (diff) |
rgtc: fix issues with compressor and signed types.
With signed types we weren't hitting this test however the comment
stating this doesn't happen often doesn't apply when using signed
types since an all 0 block is quite common which isn't abs min or max.
this fixes the limits correctly again also.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main/texcompress_rgtc.c')
-rw-r--r-- | src/mesa/main/texcompress_rgtc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/texcompress_rgtc.c b/src/mesa/main/texcompress_rgtc.c index 6b4e3b13cbe..1b873035b68 100644 --- a/src/mesa/main/texcompress_rgtc.c +++ b/src/mesa/main/texcompress_rgtc.c @@ -364,7 +364,7 @@ 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 = -127; + decode = -128; else decode = 127; @@ -442,8 +442,8 @@ _mesa_fetch_texel_2d_f_signed_rg_rgtc2(const struct gl_texture_image *texImage, #define TAG(x) signed_##x #define TYPE GLbyte -#define T_MIN (GLbyte)-127 -#define T_MAX (GLbyte)128 +#define T_MIN (GLbyte)-128 +#define T_MAX (GLbyte)127 #include "texcompress_rgtc_tmp.h" |