summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texcompress_fxt1.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-09-01 15:44:46 +1000
committerDave Airlie <airlied@redhat.com>2015-09-02 09:32:26 +1000
commitb4a70401f52e5d7e08c94715b250ea1de8f63d15 (patch)
tree377083d3d40e74e678499b7dfd4e4f7e9286e26b /src/mesa/main/texcompress_fxt1.c
parent6a3e1fb958778e00e8fe2d860b6327fc4409c148 (diff)
downloadexternal_mesa3d-b4a70401f52e5d7e08c94715b250ea1de8f63d15.zip
external_mesa3d-b4a70401f52e5d7e08c94715b250ea1de8f63d15.tar.gz
external_mesa3d-b4a70401f52e5d7e08c94715b250ea1de8f63d15.tar.bz2
texcompress_s3tc/fxt1: fix stride checks (v1.1)
The fastpath currently checks the RowLength != width, but if you have a RowLength of 7, and Alignment of 4, then that shouldn't match. align the rowlength to the pack alignment before comparing. This fixes compressed cases in CTS packed_pixels_pixelstore test when SKIP_PIXELS is enabled, which causes row length to get set. v1.1: add fxt1 fix (Iago) Cc: "11.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mesa/main/texcompress_fxt1.c')
-rw-r--r--src/mesa/main/texcompress_fxt1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index f06f048..d605e25 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -65,7 +65,7 @@ _mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS)
if (srcFormat != GL_RGB ||
srcType != GL_UNSIGNED_BYTE ||
ctx->_ImageTransferState ||
- srcPacking->RowLength != srcWidth ||
+ ALIGN(srcPacking->RowLength, srcPacking->Alignment) != srcWidth ||
srcPacking->SwapBytes) {
/* convert image to RGB/GLubyte */
GLubyte *tempImageSlices[1];