summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-07-17 15:25:01 +0200
committerMarek Olšák <[email protected]>2016-07-30 15:02:14 +0200
commitf2adba4a4c1e69586a3a112ad51525c1162b01e6 (patch)
treef1d3315fa5373165669335806a8c5d3cad9a4c14 /src/mesa/state_tracker/st_atom.c
parentebdc82d06532f992aea592265c29a11330e698fa (diff)
st/mesa: remove atom debugging code
This won't be needed after the rewrite. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_atom.c')
-rw-r--r--src/mesa/state_tracker/st_atom.c70
1 files changed, 3 insertions, 67 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index b9d31919474..9d5cc0f3010 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -134,25 +134,6 @@ check_state(const struct st_state_flags *a, const struct st_state_flags *b)
return (a->mesa & b->mesa) || (a->st & b->st);
}
-
-static void
-accumulate_state(struct st_state_flags *a, const struct st_state_flags *b)
-{
- a->mesa |= b->mesa;
- a->st |= b->st;
-}
-
-
-static void
-xor_states(struct st_state_flags *result,
- const struct st_state_flags *a,
- const struct st_state_flags *b)
-{
- result->mesa = a->mesa ^ b->mesa;
- result->st = a->st ^ b->st;
-}
-
-
/* Too complex to figure out, just check every time:
*/
static void check_program_state( struct st_context *st )
@@ -241,54 +222,9 @@ void st_validate_state( struct st_context *st, enum st_pipeline pipeline )
/*printf("%s %x/%x\n", __func__, state->mesa, state->st);*/
-#ifdef DEBUG
- if (1) {
-#else
- if (0) {
-#endif
- /* Debug version which enforces various sanity checks on the
- * state flags which are generated and checked to help ensure
- * state atoms are ordered correctly in the list.
- */
- struct st_state_flags examined, prev;
- memset(&examined, 0, sizeof(examined));
- prev = *state;
-
- for (i = 0; i < num_atoms; i++) {
- const struct st_tracked_state *atom = atoms[i];
- struct st_state_flags generated;
-
- /*printf("atom %s %x/%x\n", atom->name, atom->dirty.mesa, atom->dirty.st);*/
-
- if (!(atom->dirty.mesa || atom->dirty.st) ||
- !atom->update) {
- printf("malformed atom %s\n", atom->name);
- assert(0);
- }
-
- if (check_state(state, &atom->dirty)) {
- atoms[i]->update( st );
- /*printf("after: %x\n", atom->dirty.mesa);*/
- }
-
- accumulate_state(&examined, &atom->dirty);
-
- /* generated = (prev ^ state)
- * if (examined & generated)
- * fail;
- */
- xor_states(&generated, &prev, state);
- assert(!check_state(&examined, &generated));
- prev = *state;
- }
- /*printf("\n");*/
-
- }
- else {
- for (i = 0; i < num_atoms; i++) {
- if (check_state(state, &atoms[i]->dirty))
- atoms[i]->update( st );
- }
+ for (i = 0; i < num_atoms; i++) {
+ if (check_state(state, &atoms[i]->dirty))
+ atoms[i]->update( st );
}
memset(state, 0, sizeof(*state));