summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915simple
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2009-08-30 13:57:37 +0100
committerJakob Bornecrantz <[email protected]>2009-08-31 16:29:57 +0100
commit00b07280948fc7608fdede4be73c504499247f17 (patch)
treecf09f9c4882c346dc7c712a8178a3aa8640216e0 /src/gallium/drivers/i915simple
parent4224bda684aaee92d27e09c5545a7094cda0ae76 (diff)
i915g: Cleanup i915_texture.c
Diffstat (limited to 'src/gallium/drivers/i915simple')
-rw-r--r--src/gallium/drivers/i915simple/i915_texture.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index 975602a1664..d3639628898 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -133,7 +133,7 @@ i915_miptree_set_level_info(struct i915_texture *tex,
static void
i915_miptree_set_image_offset(struct i915_texture *tex,
- unsigned level, unsigned img, unsigned x, unsigned y)
+ unsigned level, unsigned img, unsigned x, unsigned y)
{
if (img == 0 && level == 0)
assert(x == 0 && y == 0);
@@ -165,11 +165,11 @@ i915_scanout_layout(struct i915_texture *tex)
if (pt->last_level > 0 || pt->block.size != 4)
return 0;
- i915_miptree_set_level_info( tex, 0, 1,
- tex->base.width[0],
- tex->base.height[0],
- 1 );
- i915_miptree_set_image_offset( tex, 0, 0, 0, 0 );
+ i915_miptree_set_level_info(tex, 0, 1,
+ tex->base.width[0],
+ tex->base.height[0],
+ 1);
+ i915_miptree_set_image_offset(tex, 0, 0, 0, 0);
#if 0 /* TODO use this code when backend is smarter */
if (tex->base.width[0] >= 240) {
@@ -195,7 +195,7 @@ i915_scanout_layout(struct i915_texture *tex)
}
static void
-i945_miptree_layout_2d( struct i915_texture *tex )
+i945_miptree_layout_2d(struct i915_texture *tex)
{
struct pipe_texture *pt = &tex->base;
const int align_x = 2, align_y = 4;
@@ -210,7 +210,7 @@ i945_miptree_layout_2d( struct i915_texture *tex )
/* used for scanouts that need special layouts */
if (tex->base.tex_usage & PIPE_TEXTURE_USAGE_PRIMARY)
if (i915_scanout_layout(tex))
- return;
+ return;
tex->stride = round_up(pt->nblocksx[0] * pt->block.size, 4);
@@ -221,11 +221,11 @@ i945_miptree_layout_2d( struct i915_texture *tex )
*/
if (pt->last_level > 0) {
unsigned mip1_nblocksx
- = align(pf_get_nblocksx(&pt->block, minify(width)), align_x)
+ = align(pf_get_nblocksx(&pt->block, minify(width)), align_x)
+ pf_get_nblocksx(&pt->block, minify(minify(width)));
if (mip1_nblocksx > nblocksx)
- tex->stride = mip1_nblocksx * pt->block.size;
+ tex->stride = mip1_nblocksx * pt->block.size;
}
/* Pitch must be a whole number of dwords
@@ -247,10 +247,10 @@ i945_miptree_layout_2d( struct i915_texture *tex )
/* Layout_below: step right after second mipmap level.
*/
if (level == 1) {
- x += align(nblocksx, align_x);
+ x += align(nblocksx, align_x);
}
else {
- y += nblocksy;
+ y += nblocksy;
}
width = minify(width);
@@ -468,7 +468,7 @@ i915_miptree_layout(struct i915_texture * tex)
nblocksy = round_up(MAX2(2, nblocksy), 2);
- tex->total_nblocksy += nblocksy;
+ tex->total_nblocksy += nblocksy;
width = minify(width);
height = minify(height);
@@ -596,10 +596,10 @@ i915_texture_create(struct pipe_screen *screen,
if (i915screen->is_i945) {
if (!i945_miptree_layout(tex))
- goto fail;
+ goto fail;
} else {
if (!i915_miptree_layout(tex))
- goto fail;
+ goto fail;
}
tex_size = tex->stride * tex->total_nblocksy;
@@ -735,9 +735,9 @@ i915_init_screen_texture_functions(struct i915_screen *is)
is->base.tex_surface_destroy = i915_tex_surface_destroy;
}
-boolean i915_get_texture_buffer( struct pipe_texture *texture,
- struct pipe_buffer **buf,
- unsigned *stride )
+boolean i915_get_texture_buffer(struct pipe_texture *texture,
+ struct pipe_buffer **buf,
+ unsigned *stride)
{
struct i915_texture *tex = (struct i915_texture *)texture;