Mesa (mesa_7_7_branch): radeon/r200/r300: don't clean non-emitted state.

Dave Airlie airlied at kemper.freedesktop.org
Wed Jan 27 02:33:27 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 2f28ca0a27cb0c539affb22c487c4bb44b6d54b4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2f28ca0a27cb0c539affb22c487c4bb44b6d54b4

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Jan 27 11:46:26 2010 +1000

radeon/r200/r300: don't clean non-emitted state.

So if we don't actually emit an atom to the hw because we don't
need it in the current state (e.g. lighting related atoms when
lighting is off) then don't mark it as clean, because when
lighting gets switched on we won't emit it at all.

This fixes funky gears colors.

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/mesa/drivers/dri/radeon/radeon_common.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 9b64c21..47bc252 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -1015,10 +1015,11 @@ static INLINE void radeon_emit_atom(radeonContextPtr radeon, struct radeon_state
 			OUT_BATCH_TABLE(atom->cmd, dwords);
 			END_BATCH();
 		}
+		atom->dirty = GL_FALSE;
+
 	} else {
 		radeon_print(RADEON_STATE, RADEON_VERBOSE, "  skip state %s\n", atom->name);
 	}
-	atom->dirty = GL_FALSE;
 
 }
 




More information about the mesa-commit mailing list