From a13de2464dd034ff117f9314df5757d068cae8e5 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 14 Aug 2007 14:52:38 -0600 Subject: Implement texture cache with multiple, direct-mapped entries. --- src/mesa/pipe/tgsi/core/tgsi_exec.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/mesa/pipe/tgsi/core') diff --git a/src/mesa/pipe/tgsi/core/tgsi_exec.h b/src/mesa/pipe/tgsi/core/tgsi_exec.h index b3ed124d3f..5e07e18a31 100644 --- a/src/mesa/pipe/tgsi/core/tgsi_exec.h +++ b/src/mesa/pipe/tgsi/core/tgsi_exec.h @@ -21,13 +21,21 @@ struct tgsi_exec_vector union tgsi_exec_channel xyzw[4]; }; -#define SAMPLER_CACHE_SIZE 8 #define NUM_CHANNELS 4 /* R,G,B,A */ #ifndef QUAD_SIZE #define QUAD_SIZE 4 /* 4 pixel/quad */ #endif +#define TEX_CACHE_TILE_SIZE 8 +#define TEX_CACHE_NUM_ENTRIES 8 + +struct tgsi_texture_cache_entry +{ + int x, y, face, level, zslice; + GLfloat data[TEX_CACHE_TILE_SIZE][TEX_CACHE_TILE_SIZE][4]; +}; + struct tgsi_sampler { const struct pipe_sampler_state *state; @@ -40,9 +48,7 @@ struct tgsi_sampler GLfloat lodbias, GLfloat rgba[NUM_CHANNELS][QUAD_SIZE]); void *pipe; /*XXX temporary*/ - - GLint cache_x, cache_y, cache_level; - GLfloat cache[SAMPLER_CACHE_SIZE][SAMPLER_CACHE_SIZE][4]; + struct tgsi_texture_cache_entry cache[TEX_CACHE_NUM_ENTRIES]; }; struct tgsi_exec_labels -- cgit v1.2.3