summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_tex_layout.c
diff options
context:
space:
mode:
authorJouk <joukj@tarantella.nano.tudelft.nl>2007-10-31 08:18:58 +0100
committerJouk <joukj@tarantella.nano.tudelft.nl>2007-10-31 08:18:58 +0100
commitd1414da8f9dbf3c27cf05509be51e8c70ed1185d (patch)
treeb6b3fdccea77d6173c1a829e0d2710d5b973dd5a /src/mesa/drivers/dri/i965/brw_tex_layout.c
parentb263435a98173645fa3f4a5dce4566e53470f38f (diff)
parentd2f19a554a9089fddb5e978e3a732bbf71d77f93 (diff)
Merge branch 'master' of git+ssh://joukj@git.freedesktop.org/git/mesa/mesa
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_tex_layout.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_tex_layout.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c
index 2094a1c8ad..e306c9cf10 100644
--- a/src/mesa/drivers/dri/i965/brw_tex_layout.c
+++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c
@@ -37,8 +37,6 @@
#include "intel_tex_layout.h"
#include "macros.h"
-#define ALIGN(value, alignment) ((value + alignment - 1) & ~(alignment - 1))
-
GLboolean brw_miptree_layout( struct intel_mipmap_tree *mt )
{
/* XXX: these vary depending on image format:
@@ -64,7 +62,7 @@ GLboolean brw_miptree_layout( struct intel_mipmap_tree *mt )
mt->pitch = ALIGN(width, align_w);
pack_y_pitch = (height + 3) / 4;
} else {
- mt->pitch = ((mt->width0 * mt->cpp + 3) & ~3) / mt->cpp;
+ mt->pitch = ALIGN(mt->width0 * mt->cpp, 4) / mt->cpp;
pack_y_pitch = ALIGN(mt->height0, align_h);
}