summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_quad_fs.c
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/softpipe/sp_quad_fs.c
parentc7722edcfdf36e0d0bfdc51013ecb199fc7fa9f6 (diff)
Implement texture cache with multiple, direct-mapped entries.
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_quad_fs.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_fs.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c
index 096385d7a1..e767d0a470 100644
--- a/src/mesa/pipe/softpipe/sp_quad_fs.c
+++ b/src/mesa/pipe/softpipe/sp_quad_fs.c
@@ -318,16 +318,21 @@ static void shade_begin(struct quad_stage *qs)
{
struct quad_shade_stage *qss = quad_shade_stage(qs);
struct softpipe_context *softpipe = qs->softpipe;
- GLuint i;
+ GLuint i, entry;
+
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
qss->samplers[i].state = &softpipe->sampler[i];
qss->samplers[i].texture = softpipe->texture[i];
qss->samplers[i].get_samples = sp_get_samples;
qss->samplers[i].pipe = &softpipe->pipe;
/* init cache info here */
- qss->samplers[i].cache_x =
- qss->samplers[i].cache_y = -1;
- qss->samplers[i].cache_level = -1;
+ for (entry = 0; entry < TEX_CACHE_NUM_ENTRIES; entry++) {
+ qss->samplers[i].cache[entry].x = -1;
+ qss->samplers[i].cache[entry].y = -1;
+ qss->samplers[i].cache[entry].level = -1;
+ qss->samplers[i].cache[entry].face = -1;
+ qss->samplers[i].cache[entry].zslice = -1;
+ }
}
if (qs->next)