summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/tgsi
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-14 14:52:38 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-14 14:52:38 -0600
commita13de2464dd034ff117f9314df5757d068cae8e5 (patch)
treef429edad000f2e9affc8feee3fafb0ea1f113ccf /src/mesa/pipe/tgsi
parentc7722edcfdf36e0d0bfdc51013ecb199fc7fa9f6 (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.h14
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