From 479d929530ce40a39d9310576b97cb46fab214de Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Thu, 12 Feb 2009 19:38:35 +0100 Subject: [PATCH] Cosmetic: Rename struct pipe_transfer pointers from 'ps' to 'pt'. Missed these for the initial gallium-texture-transfer commit. --- src/gallium/auxiliary/util/u_tile.h | 26 +++++++++++++------------- src/gallium/drivers/softpipe/sp_tile_cache.c | 28 ++++++++++++++-------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/gallium/auxiliary/util/u_tile.h b/src/gallium/auxiliary/util/u_tile.h index b6bd43d..1453af3 100644 --- a/src/gallium/auxiliary/util/u_tile.h +++ b/src/gallium/auxiliary/util/u_tile.h @@ -38,16 +38,16 @@ struct pipe_transfer; * \return TRUE if tile is totally clipped, FALSE otherwise */ static INLINE boolean -pipe_clip_tile(uint x, uint y, uint *w, uint *h, const struct pipe_transfer *ps) +pipe_clip_tile(uint x, uint y, uint *w, uint *h, const struct pipe_transfer *pt) { - if (x >= ps->width) + if (x >= pt->width) return TRUE; - if (y >= ps->height) + if (y >= pt->height) return TRUE; - if (x + *w > ps->width) - *w = ps->width - x; - if (y + *h > ps->height) - *h = ps->height - y; + if (x + *w > pt->width) + *w = pt->width - x; + if (y + *h > pt->height) + *h = pt->height - y; return FALSE; } @@ -56,34 +56,34 @@ extern "C" { #endif void -pipe_get_tile_raw(struct pipe_transfer *ps, +pipe_get_tile_raw(struct pipe_transfer *pt, uint x, uint y, uint w, uint h, void *p, int dst_stride); void -pipe_put_tile_raw(struct pipe_transfer *ps, +pipe_put_tile_raw(struct pipe_transfer *pt, uint x, uint y, uint w, uint h, const void *p, int src_stride); void -pipe_get_tile_rgba(struct pipe_transfer *ps, +pipe_get_tile_rgba(struct pipe_transfer *pt, uint x, uint y, uint w, uint h, float *p); void -pipe_put_tile_rgba(struct pipe_transfer *ps, +pipe_put_tile_rgba(struct pipe_transfer *pt, uint x, uint y, uint w, uint h, const float *p); void -pipe_get_tile_z(struct pipe_transfer *ps, +pipe_get_tile_z(struct pipe_transfer *pt, uint x, uint y, uint w, uint h, uint *z); void -pipe_put_tile_z(struct pipe_transfer *ps, +pipe_put_tile_z(struct pipe_transfer *pt, uint x, uint y, uint w, uint h, const uint *z); diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index e6b6e6f..c070cf6 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -338,20 +338,20 @@ static void sp_tile_cache_flush_clear(struct pipe_context *pipe, struct softpipe_tile_cache *tc) { - struct pipe_transfer *ps = tc->transfer; + struct pipe_transfer *pt = tc->transfer; const uint w = tc->transfer->width; const uint h = tc->transfer->height; uint x, y; uint numCleared = 0; /* clear the scratch tile to the clear value */ - clear_tile(&tc->tile, ps->format, tc->clear_val); + clear_tile(&tc->tile, pt->format, tc->clear_val); /* push the tile to all positions marked as clear */ for (y = 0; y < h; y += TILE_SIZE) { for (x = 0; x < w; x += TILE_SIZE) { if (is_clear_flag_set(tc->clear_flags, x, y)) { - pipe_put_tile_raw(ps, + pipe_put_tile_raw(pt, x, y, TILE_SIZE, TILE_SIZE, tc->tile.data.color32, 0/*STRIDE*/); @@ -376,21 +376,21 @@ void sp_flush_tile_cache(struct softpipe_context *softpipe, struct softpipe_tile_cache *tc) { - struct pipe_transfer *ps = tc->transfer; + struct pipe_transfer *pt = tc->transfer; int inuse = 0, pos; - if (ps) { + if (pt) { /* caching a drawing transfer */ for (pos = 0; pos < NUM_ENTRIES; pos++) { struct softpipe_cached_tile *tile = tc->entries + pos; if (tile->x >= 0) { if (tc->depth_stencil) { - pipe_put_tile_raw(ps, + pipe_put_tile_raw(pt, tile->x, tile->y, TILE_SIZE, TILE_SIZE, tile->data.depth32, 0/*STRIDE*/); } else { - pipe_put_tile_rgba(ps, + pipe_put_tile_rgba(pt, tile->x, tile->y, TILE_SIZE, TILE_SIZE, (float *) tile->data.color); } @@ -425,7 +425,7 @@ struct softpipe_cached_tile * sp_get_cached_tile(struct softpipe_context *softpipe, struct softpipe_tile_cache *tc, int x, int y) { - struct pipe_transfer *ps = tc->transfer; + struct pipe_transfer *pt = tc->transfer; /* tile pos in framebuffer: */ const int tile_x = x & ~(TILE_SIZE - 1); @@ -441,12 +441,12 @@ sp_get_cached_tile(struct softpipe_context *softpipe, if (tile->x != -1) { /* put dirty tile back in framebuffer */ if (tc->depth_stencil) { - pipe_put_tile_raw(ps, + pipe_put_tile_raw(pt, tile->x, tile->y, TILE_SIZE, TILE_SIZE, tile->data.depth32, 0/*STRIDE*/); } else { - pipe_put_tile_rgba(ps, + pipe_put_tile_rgba(pt, tile->x, tile->y, TILE_SIZE, TILE_SIZE, (float *) tile->data.color); } @@ -458,22 +458,22 @@ sp_get_cached_tile(struct softpipe_context *softpipe, if (is_clear_flag_set(tc->clear_flags, x, y)) { /* don't get tile from framebuffer, just clear it */ if (tc->depth_stencil) { - clear_tile(tile, ps->format, tc->clear_val); + clear_tile(tile, pt->format, tc->clear_val); } else { - clear_tile_rgba(tile, ps->format, tc->clear_color); + clear_tile_rgba(tile, pt->format, tc->clear_color); } clear_clear_flag(tc->clear_flags, x, y); } else { /* get new tile data from transfer */ if (tc->depth_stencil) { - pipe_get_tile_raw(ps, + pipe_get_tile_raw(pt, tile->x, tile->y, TILE_SIZE, TILE_SIZE, tile->data.depth32, 0/*STRIDE*/); } else { - pipe_get_tile_rgba(ps, + pipe_get_tile_rgba(pt, tile->x, tile->y, TILE_SIZE, TILE_SIZE, (float *) tile->data.color); } -- 2.7.4