summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom.c
diff options
context:
space:
mode:
authorkeithw <keithw@keithw-laptop.(none)>2007-08-25 22:00:36 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2007-08-25 22:01:32 +0100
commit4185da4681405f3cc4d0cc601d428f2f44d0dda8 (patch)
tree9640d32ac9034035269bcb81973114a2c91969b0 /src/mesa/state_tracker/st_atom.c
parent07d97e80e616d9fdc437d3b41055c347d5c54932 (diff)
add names to tracked state atoms to improve debug
Diffstat (limited to 'src/mesa/state_tracker/st_atom.c')
-rw-r--r--src/mesa/state_tracker/st_atom.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 99fcbdfda7..66ab5d7c3a 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -155,6 +155,8 @@ void st_validate_state( struct st_context *st )
if (state->st == 0)
return;
+// _mesa_printf("%s %x/%x\n", __FUNCTION__, state->mesa, state->st);
+
if (1) {
/* Debug version which enforces various sanity checks on the
* state flags which are generated and checked to help ensure
@@ -168,14 +170,17 @@ void st_validate_state( struct st_context *st )
const struct st_tracked_state *atom = st->atoms[i];
struct st_state_flags generated;
+// _mesa_printf("atom %s %x/%x\n", atom->name, atom->dirty.mesa, atom->dirty.st);
+
if (!(atom->dirty.mesa || atom->dirty.st) ||
!atom->update) {
- _mesa_printf("malformed atom %d\n", i);
+ _mesa_printf("malformed atom %s\n", atom->name);
assert(0);
}
if (check_state(state, &atom->dirty)) {
st->atoms[i]->update( st );
+// _mesa_printf("after: %x\n", atom->dirty.mesa);
}
accumulate_state(&examined, &atom->dirty);
@@ -188,6 +193,8 @@ void st_validate_state( struct st_context *st )
assert(!check_state(&examined, &generated));
prev = *state;
}
+// _mesa_printf("\n");
+
}
else {
const GLuint nr = st->nr_atoms;