Module: Mesa Branch: map-texture-image-v4 Commit: 99ae989052884312ae69b1739c313c4eafe5b6c1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=99ae989052884312ae69b1739c313c4eafe5b6c1
Author: Brian Paul <[email protected]> Date: Wed Jul 27 22:23:07 2011 -0600 mesa: fix compressed texture strides --- src/mesa/main/texcompress_fxt1.c | 2 +- src/mesa/main/texcompress_rgtc_tmp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c index 2d180a1..9a8fe46 100644 --- a/src/mesa/main/texcompress_fxt1.c +++ b/src/mesa/main/texcompress_fxt1.c @@ -1636,7 +1636,7 @@ fxt1_decode_1 (const void *texture, GLint stride, /* in pixels */ }; const GLubyte *code = (const GLubyte *)texture + - ((j / 4) * (stride / 8) + (i / 8)) * 16; + (j / 4) * stride + (i / 8) * 16; GLint mode = CC_SEL(code, 125); GLint t = i & 7; diff --git a/src/mesa/main/texcompress_rgtc_tmp.h b/src/mesa/main/texcompress_rgtc_tmp.h index c8bf082..902aa7c 100644 --- a/src/mesa/main/texcompress_rgtc_tmp.h +++ b/src/mesa/main/texcompress_rgtc_tmp.h @@ -33,7 +33,7 @@ static void TAG(fetch_texel_rgtc)(unsigned srcRowStride, const TYPE *pixdata, unsigned i, unsigned j, TYPE *value, unsigned comps) { TYPE decode; - const TYPE *blksrc = (pixdata + ((srcRowStride + 3) / 4 * (j / 4) + (i / 4)) * 8 * comps); + const TYPE *blksrc = (pixdata + srcRowStride * (j / 4) + (i / 4) * 8 * comps); const TYPE alpha0 = blksrc[0]; const TYPE alpha1 = blksrc[1]; const char bit_pos = ((j&3) * 4 + (i&3)) * 3; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
