diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-07-16 14:14:32 +0100 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2009-07-22 12:47:59 +0100 |
commit | aa5db684382bd8662a83ca09ed000e4a5a1013f9 (patch) | |
tree | d4ef507f02a680abbafd71ce02fd2924dc7664ea /src/gallium/drivers/softpipe/sp_tile_cache.c | |
parent | ede9f3b52ecb27ada81fee06a943bb595c60eaee (diff) |
softpipe: remove backwards dependency from tilecache to softpipe
The tile cache is a utility, it shouldn't know anything about the
entity which is making use of it (ie softpipe).
Remove softpipe parameter to all the tilecache function calls, and
also remove the need to keep a softpipe pointer in the sampler structs.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_tile_cache.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_tile_cache.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 1f9b8f1f4f..306284808c 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -236,8 +236,7 @@ sp_tile_cache_unmap_transfers(struct softpipe_tile_cache *tc) * Specify the texture to cache. */ void -sp_tile_cache_set_texture(struct pipe_context *pipe, - struct softpipe_tile_cache *tc, +sp_tile_cache_set_texture(struct softpipe_tile_cache *tc, struct pipe_texture *texture) { uint i; @@ -344,8 +343,7 @@ clear_tile(struct softpipe_cached_tile *tile, * Actually clear the tiles which were flagged as being in a clear state. */ static void -sp_tile_cache_flush_clear(struct pipe_context *pipe, - struct softpipe_tile_cache *tc) +sp_tile_cache_flush_clear(struct softpipe_tile_cache *tc) { struct pipe_transfer *pt = tc->transfer; const uint w = tc->transfer->width; @@ -382,8 +380,7 @@ sp_tile_cache_flush_clear(struct pipe_context *pipe, * any tiles "flagged" as cleared will be "really" cleared. */ void -sp_flush_tile_cache(struct softpipe_context *softpipe, - struct softpipe_tile_cache *tc) +sp_flush_tile_cache(struct softpipe_tile_cache *tc) { struct pipe_transfer *pt = tc->transfer; int inuse = 0, pos; @@ -409,7 +406,7 @@ sp_flush_tile_cache(struct softpipe_context *softpipe, } #if TILE_CLEAR_OPTIMIZATION - sp_tile_cache_flush_clear(&softpipe->pipe, tc); + sp_tile_cache_flush_clear(tc); #endif } else if (tc->texture) { @@ -431,8 +428,7 @@ sp_flush_tile_cache(struct softpipe_context *softpipe, * \param x, y position of tile, in pixels */ struct softpipe_cached_tile * -sp_get_cached_tile(struct softpipe_context *softpipe, - struct softpipe_tile_cache *tc, int x, int y) +sp_get_cached_tile(struct softpipe_tile_cache *tc, int x, int y) { struct pipe_transfer *pt = tc->transfer; @@ -513,11 +509,11 @@ tex_cache_pos(int x, int y, int z, int face, int level) * Tiles are read-only and indexed with more params. */ const struct softpipe_cached_tile * -sp_get_cached_tile_tex(struct softpipe_context *sp, - struct softpipe_tile_cache *tc, int x, int y, int z, +sp_get_cached_tile_tex(struct softpipe_tile_cache *tc, + int x, int y, int z, int face, int level) { - struct pipe_screen *screen = sp->pipe.screen; + struct pipe_screen *screen = tc->screen; /* tile pos in framebuffer: */ const int tile_x = x & ~(TILE_SIZE - 1); const int tile_y = y & ~(TILE_SIZE - 1); |