Mesa (master): r300g: do not invalidate texture caches when only sampler state is changed

Marek Olšák mareko at kemper.freedesktop.org
Sat Feb 13 14:45:43 UTC 2010


Module: Mesa
Branch: master
Commit: 43b4d2a048ee8e89e7b8ab38d0ad2bc2daae8402
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=43b4d2a048ee8e89e7b8ab38d0ad2bc2daae8402

Author: Marek Olšák <maraeo at gmail.com>
Date:   Fri Feb 12 05:03:27 2010 +0100

r300g: do not invalidate texture caches when only sampler state is changed

---

 src/gallium/drivers/r300/r300_emit.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 3b59367..5a4196c 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -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);




More information about the mesa-commit mailing list