diff options
author | Brian Paul <brianp@vmware.com> | 2009-08-21 14:01:58 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-08-21 14:01:58 -0600 |
commit | 3adc8c3779895c483ba8a1004939e7dd7d76fa9a (patch) | |
tree | 58a28a547eff209731b78e012e5a9d383075f272 /src/gallium/drivers/softpipe/sp_state_derived.c | |
parent | 4256c5829f8c23f8bd5c7c29491210f0f7813bf9 (diff) |
softpipe: minor code refactoring to remove softpipe/tile cache dependencies
The tile cache code now has no hard dependencies on softpipe.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_derived.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_derived.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_derived.c b/src/gallium/drivers/softpipe/sp_state_derived.c index 5310928332..202a2bc94c 100644 --- a/src/gallium/drivers/softpipe/sp_state_derived.c +++ b/src/gallium/drivers/softpipe/sp_state_derived.c @@ -34,6 +34,8 @@ #include "sp_context.h" #include "sp_screen.h" #include "sp_state.h" +#include "sp_texture.h" +#include "sp_tile_cache.h" /** @@ -201,10 +203,19 @@ update_tgsi_samplers( struct softpipe_context *softpipe ) softpipe_reset_sampler_varients( softpipe ); for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { - sp_tile_cache_validate_texture( softpipe->tex_cache[i] ); + struct softpipe_tile_cache *tc = softpipe->tex_cache[i]; + if (tc->texture) { + struct softpipe_texture *spt = softpipe_texture(tc->texture); + if (spt->timestamp != tc->timestamp) { + sp_tile_cache_validate_texture( tc ); + _debug_printf("INV %d %d\n", tc->timestamp, spt->timestamp); + tc->timestamp = spt->timestamp; + } + } } } + /* Hopefully this will remain quite simple, otherwise need to pull in * something like the state tracker mechanism. */ |