Module: Mesa Branch: master Commit: 991d5cf8ce5c7842801fdb0378bf5aca5a59cc4c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=991d5cf8ce5c7842801fdb0378bf5aca5a59cc4c
Author: Brian Paul <bri...@vmware.com> Date: Fri Sep 5 15:20:00 2014 -0600 mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore() We need parenthesis around the expression which computes the number of blocks per row. Reviewed-by: Matt Turner <matts...@gmail.com> Cc: "10.3 10.4" <mesa-sta...@lists.freedesktop.org> --- src/mesa/main/texstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index f858cef..50aa1fd 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -2231,7 +2231,7 @@ _mesa_compute_compressed_pixelstore(GLuint dims, mesa_format texFormat, if (packing->RowLength) { store->TotalBytesPerRow = packing->CompressedBlockSize * - (packing->RowLength + bw - 1) / bw; + ((packing->RowLength + bw - 1) / bw); } store->SkipBytes += packing->SkipPixels * packing->CompressedBlockSize / bw; _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit