summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_mipmap_tree.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 0fb33e27f4..268a982a97 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -233,8 +233,8 @@ GLboolean intel_miptree_image_data(struct intel_context *intel,
if (dst->compressed) {
alignment = intel_compressed_alignment(dst->internal_format);
- src_row_pitch = ((src_row_pitch + alignment - 1) & ~(alignment - 1));
- width = ((width + alignment - 1) & ~(alignment - 1));
+ src_row_pitch = ALIGN(src_row_pitch, alignment);
+ width = ALIGN(width, alignment);
height = (height + 3) / 4;
}