summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/i915simple/i915_texture.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-01-20 10:38:35 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-01-20 10:38:35 +1100
commitdf09ed9d1ecf11be14ee7f189273c14375fbaa57 (patch)
tree7322a2670877dff003f57a5485c9e92226b57167 /src/mesa/pipe/i915simple/i915_texture.c
parent0feec292ddc279998a1e25c10ea70d211f7b4b62 (diff)
parenta1f4a5e802ad62c88fca6834b9de1c83672230a6 (diff)
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_texture.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_texture.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/pipe/i915simple/i915_texture.c b/src/mesa/pipe/i915simple/i915_texture.c
index 44f72e63cc..6b0a4a96f3 100644
--- a/src/mesa/pipe/i915simple/i915_texture.c
+++ b/src/mesa/pipe/i915simple/i915_texture.c
@@ -123,7 +123,7 @@ i945_miptree_layout_2d( struct i915_texture *tex )
* 2nd mipmap out past the width of its parent.
*/
if (pt->first_level != pt->last_level) {
- unsigned mip1_width = align(minify(pt->width[0]), align_w)
+ unsigned mip1_width = align_int(minify(pt->width[0]), align_w)
+ minify(minify(pt->width[0]));
if (mip1_width > pt->width[0])
@@ -133,7 +133,7 @@ i945_miptree_layout_2d( struct i915_texture *tex )
/* Pitch must be a whole number of dwords, even though we
* express it in texels.
*/
- tex->pitch = align(tex->pitch * pt->cpp, 4) / pt->cpp;
+ tex->pitch = align_int(tex->pitch * pt->cpp, 4) / pt->cpp;
tex->total_height = 0;
for ( level = pt->first_level ; level <= pt->last_level ; level++ ) {
@@ -144,7 +144,7 @@ i945_miptree_layout_2d( struct i915_texture *tex )
if (pt->compressed)
img_height = MAX2(1, height/4);
else
- img_height = align(height, align_h);
+ img_height = align_int(height, align_h);
/* Because the images are packed better, the final offset
@@ -155,7 +155,7 @@ i945_miptree_layout_2d( struct i915_texture *tex )
/* Layout_below: step right after second mipmap.
*/
if (level == pt->first_level + 1) {
- x += align(width, align_w);
+ x += align_int(width, align_w);
}
else {
y += img_height;
@@ -531,9 +531,9 @@ i915_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
for (i = 0; i < PIPE_MAX_TEXTURE_LEVELS; i++)
if (tex->image_offset[i])
- free(tex->image_offset[i]);
+ FREE(tex->image_offset[i]);
- free(tex);
+ FREE(tex);
}
*pt = NULL;
}