On 2 February 2017 at 12:43, Józef Kucia jkucia@codeweavers.com wrote:
@@ -3520,19 +3546,19 @@ BOOL context_apply_draw_state(struct wined3d_context *context, wined3d_buffer_load_sysmem(state->index_buffer, context); }
- for (i = 0; i < context->numDirtyEntries; ++i)
- for (i = 0, dirty_idx = 0; i < context->numDirtyEntries; ++i) { DWORD rep = context->dirtyArray[i];
DWORD idx = rep / (sizeof(*context->isStateDirty) * CHAR_BIT);
BYTE shift = rep & ((sizeof(*context->isStateDirty) * CHAR_BIT) - 1);
context->isStateDirty[idx] &= ~(1u << shift);
state_table[rep].apply(context, state, rep);
if (!is_compute_state(rep))
apply_state(context, state_table, state, rep);
else
context->dirtyArray[dirty_idx++] = rep;
I'd rather not do this. How important is it to avoid applying compute dispatch states for draws and vice-versa?
As an aside, "dirtyArray" is mostly redundant, and possibly a little harmful.