Mesa (10.4): mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore()
Emil Velikov
evelikov at kemper.freedesktop.org
Wed Dec 3 23:44:47 UTC 2014
Module: Mesa
Branch: 10.4
Commit: d2e9fd5b6dac5be5a921818a2ff946772448e86b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d2e9fd5b6dac5be5a921818a2ff946772448e86b
Author: Brian Paul <brianp at 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 <mattst88 at gmail.com>
Cc: "10.3 10.4" <mesa-stable at lists.freedesktop.org>
(cherry picked from commit 991d5cf8ce5c7842801fdb0378bf5aca5a59cc4c)
---
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 f913e42..b0e37a0 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2229,7 +2229,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;
More information about the mesa-commit
mailing list