Commit 80eef003 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Add some state table consistency checking to context_invalidate_state().

parent 192695d1
...@@ -78,6 +78,9 @@ void context_invalidate_state(struct wined3d_context *context, unsigned int stat ...@@ -78,6 +78,9 @@ void context_invalidate_state(struct wined3d_context *context, unsigned int stat
unsigned int representative = context->state_table[state_id].representative; unsigned int representative = context->state_table[state_id].representative;
unsigned int index, shift; unsigned int index, shift;
if (!representative)
ERR("Invalidating representative 0, state_id %u.\n", state_id);
index = representative / (sizeof(*context->dirty_graphics_states) * CHAR_BIT); index = representative / (sizeof(*context->dirty_graphics_states) * CHAR_BIT);
shift = representative & ((sizeof(*context->dirty_graphics_states) * CHAR_BIT) - 1); shift = representative & ((sizeof(*context->dirty_graphics_states) * CHAR_BIT) - 1);
context->dirty_graphics_states[index] |= (1u << shift); context->dirty_graphics_states[index] |= (1u << shift);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment