diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-01-17 13:39:14 +0900 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-01-17 13:39:14 +0900 |
commit | 271f9dac79a9247de9a57f4d248e404bf1652a13 (patch) | |
tree | 70e049d11449f2d41a7e27076995d86827e46be7 /src/mesa/pipe/i915simple/i915_texture.c | |
parent | b016f0adba8278f3744d3aaa207a1b586d51756d (diff) |
Back-port miscellaneous fixes from internal branch (mostly portability fixes).
These are changes that are in our internal branch, but somehow were skipped
so far. It was done using visual comparison of the branches --
it is likely that changes are being carried on the wrong way
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_texture.c')
-rw-r--r-- | src/mesa/pipe/i915simple/i915_texture.c | 12 |
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; } |