diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-08-14 14:52:38 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-08-14 14:52:38 -0600 |
commit | a13de2464dd034ff117f9314df5757d068cae8e5 (patch) | |
tree | f429edad000f2e9affc8feee3fafb0ea1f113ccf /src/mesa/pipe/tgsi | |
parent | c7722edcfdf36e0d0bfdc51013ecb199fc7fa9f6 (diff) |
Implement texture cache with multiple, direct-mapped entries.
Diffstat (limited to 'src/mesa/pipe/tgsi')
-rw-r--r-- | src/mesa/pipe/tgsi/core/tgsi_exec.h | 14 |
1 files changed, 10 insertions, 4 deletions
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 |