r300g: do not invalidate texture caches when only sampler state is changed
authorMarek Olšák <maraeo@gmail.com>
Fri, 12 Feb 2010 04:03:27 +0000 (05:03 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sat, 13 Feb 2010 14:44:43 +0000 (15:44 +0100)
src/gallium/drivers/r300/r300_emit.c

index 3b59367a0b191e06c19fac76cf93cc1b2406dad3..5a4196c5e36b7615200417874861639e7b39713c 100644 (file)
@@ -1148,14 +1148,15 @@ void r300_emit_dirty_state(struct r300_context* r300)
         for (i = 0; i < MIN2(r300->sampler_count, r300->texture_count); i++) {
            if (r300->dirty_state &
                ((R300_NEW_SAMPLER << i) | (R300_NEW_TEXTURE << i))) {
-               if (r300->textures[i]) 
+               if (r300->textures[i]) {
                    r300_emit_texture(r300,
                                      r300->sampler_states[i],
                                      r300->textures[i],
                                      i);
+                    dirty_tex |= r300->dirty_state & (R300_NEW_TEXTURE << i);
+                }
                 r300->dirty_state &=
                     ~((R300_NEW_SAMPLER << i) | (R300_NEW_TEXTURE << i));
-                dirty_tex++;
             }
         }
         r300->dirty_state &= ~(R300_ANY_NEW_SAMPLERS | R300_ANY_NEW_TEXTURES);