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
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);
assert(!check_state(&examined, &generated));
prev = *state;
}
+// _mesa_printf("\n");
+
}
else {
const GLuint nr = st->nr_atoms;
const struct st_tracked_state st_update_alpha_test = {
+ .name = "st_update_alpha_test",
.dirty = {
.mesa = (_NEW_COLOR),
.st = 0,
const struct st_tracked_state st_update_blend = {
+ .name = "st_update_blend",
.dirty = {
.mesa = (_NEW_COLOR), /* XXX _NEW_BLEND someday? */
.st = 0,
const struct st_tracked_state st_update_clear_color = {
+ .name = "st_update_clear_color",
.dirty = {
.mesa = _NEW_COLOR,
.st = 0,
const struct st_tracked_state st_update_clip = {
+ .name = "st_update_clip",
.dirty = {
.mesa = (_NEW_TRANSFORM),
.st = 0,
const struct st_tracked_state st_update_depth = {
+ .name = "st_update_depth",
.dirty = {
.mesa = (_NEW_DEPTH),
.st = 0,
const struct st_tracked_state st_update_framebuffer = {
+ .name = "st_update_framebuffer",
.dirty = {
.mesa = _NEW_BUFFERS,
.st = 0,
const struct st_tracked_state st_update_fs = {
+ .name = "st_update_fs",
.dirty = {
.mesa = 0,
.st = ST_NEW_FRAGMENT_PROGRAM,
const struct st_tracked_state st_update_sampler = {
+ .name = "st_update_sampler",
.dirty = {
.mesa = _NEW_TEXTURE,
.st = 0,
const struct st_tracked_state st_update_scissor = {
+ .name = "st_update_scissor",
.dirty = {
.mesa = (_NEW_SCISSOR | _NEW_BUFFERS),
.st = 0,
}
const struct st_tracked_state st_update_setup = {
+ .name = "st_update_setup",
.dirty = {
.mesa = (_NEW_LIGHT | _NEW_POLYGON | _NEW_LINE | _NEW_SCISSOR |
_NEW_POINT | _NEW_BUFFERS | _NEW_MULTISAMPLE),
const struct st_tracked_state st_update_stencil = {
+ .name = "st_update_stencil",
.dirty = {
.mesa = (_NEW_STENCIL),
.st = 0,
const struct st_tracked_state st_update_polygon_stipple = {
+ .name = "st_update_polygon_stipple",
.dirty = {
.mesa = (_NEW_POLYGONSTIPPLE),
.st = 0,
const struct st_tracked_state st_update_texture = {
+ .name = "st_update_texture",
.dirty = {
.mesa = _NEW_TEXTURE,
.st = 0,
const struct st_tracked_state st_update_viewport = {
+ .name = "st_update_viewport",
.dirty = {
.mesa = _NEW_BUFFERS | _NEW_VIEWPORT,
.st = 0,
const struct st_tracked_state st_update_vs = {
+ .name = "st_update_vs",
.dirty = {
.mesa = 0,
.st = ST_NEW_VERTEX_PROGRAM,
};
struct st_tracked_state {
+ const char *name;
struct st_state_flags dirty;
void (*update)( struct st_context *st );
};