From 80c78472ad43f4288c9ef5076074ba9d31a39885 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 29 Jul 2009 07:40:50 +0100 Subject: softpipe: split texture and surface tile caches These do similar jobs but with largely disjoint code. Will want to evolve them separately going forward. --- src/gallium/drivers/softpipe/sp_tex_sample.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gallium/drivers/softpipe/sp_tex_sample.c') diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c index 4651d781a9..8bed573e8c 100644 --- a/src/gallium/drivers/softpipe/sp_tex_sample.c +++ b/src/gallium/drivers/softpipe/sp_tex_sample.c @@ -38,7 +38,7 @@ #include "sp_surface.h" #include "sp_texture.h" #include "sp_tex_sample.h" -#include "sp_tile_cache.h" +#include "sp_tex_tile_cache.h" #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "util/u_math.h" @@ -659,7 +659,7 @@ choose_mipmap_levels(const struct pipe_texture *texture, * \param rgba the quad to put the texel/color into * \param j which element of the rgba quad to write to * - * XXX maybe move this into sp_tile_cache.c and merge with the + * XXX maybe move this into sp_tex_tile_cache.c and merge with the * sp_get_cached_tile_tex() function. Also, get 4 texels instead of 1... */ static void @@ -669,9 +669,9 @@ get_texel_quad_2d(const struct tgsi_sampler *tgsi_sampler, { const struct sp_shader_sampler *samp = sp_shader_sampler(tgsi_sampler); - const struct softpipe_cached_tile *tile + const struct softpipe_tex_cached_tile *tile = sp_get_cached_tile_tex(samp->cache, - tile_address(x, y, 0, face, level)); + tex_tile_address(x, y, 0, face, level)); y %= TILE_SIZE; x %= TILE_SIZE; @@ -688,9 +688,9 @@ get_texel_2d_ptr(const struct tgsi_sampler *tgsi_sampler, { const struct sp_shader_sampler *samp = sp_shader_sampler(tgsi_sampler); - const struct softpipe_cached_tile *tile + const struct softpipe_tex_cached_tile *tile = sp_get_cached_tile_tex(samp->cache, - tile_address(x, y, 0, face, level)); + tex_tile_address(x, y, 0, face, level)); y %= TILE_SIZE; x %= TILE_SIZE; @@ -736,10 +736,10 @@ get_texel(const struct tgsi_sampler *tgsi_sampler, else { const unsigned tx = x % TILE_SIZE; const unsigned ty = y % TILE_SIZE; - const struct softpipe_cached_tile *tile; + const struct softpipe_tex_cached_tile *tile; tile = sp_get_cached_tile_tex(samp->cache, - tile_address(x, y, z, face, level)); + tex_tile_address(x, y, z, face, level)); rgba[0][j] = tile->data.color[ty][tx][0]; rgba[1][j] = tile->data.color[ty][tx][1]; -- cgit v1.2.3