summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-02-27 23:37:01 +0100
committerMarek Olšák <[email protected]>2010-02-28 00:46:35 +0100
commit279715e76e5385afaad2834191e8578cf3a5d233 (patch)
treef6a6f6201af8e0d22d42739b9e7047aeace99245 /src/gallium/drivers/r300/r300_state.c
parentfe6d3b9222ce184daab61ebb390a6af0b9889abf (diff)
r300g: atomize invalidation of texture caches
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 79cd715af17..15e0a0ad358 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -922,6 +922,7 @@ static void r300_set_sampler_textures(struct pipe_context* pipe,
{
struct r300_context* r300 = r300_context(pipe);
boolean is_r500 = r300_screen(r300->context.screen)->caps->is_r500;
+ boolean dirty_tex = FALSE;
int i;
/* XXX magic num */
@@ -934,6 +935,7 @@ static void r300_set_sampler_textures(struct pipe_context* pipe,
pipe_texture_reference((struct pipe_texture**)&r300->textures[i],
texture[i]);
r300->dirty_state |= (R300_NEW_TEXTURE << i);
+ dirty_tex = TRUE;
/* R300-specific - set the texrect factor in a fragment shader */
if (!is_r500 && r300->textures[i]->is_npot) {
@@ -953,6 +955,10 @@ static void r300_set_sampler_textures(struct pipe_context* pipe,
}
r300->texture_count = count;
+
+ if (dirty_tex) {
+ r300->texture_cache_inval.dirty = TRUE;
+ }
}
static void r300_set_scissor_state(struct pipe_context* pipe,