Commit ebc96e32 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Optimize scanning changed texture states in wined3d_device_apply_stateblock().

parent 1cea81d1
......@@ -3951,11 +3951,12 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
}
}
for (i = 0; i < ARRAY_SIZE(state->texture_states); ++i)
for (i = 0; i < ARRAY_SIZE(changed->textureState); ++i)
{
for (j = 0; j < ARRAY_SIZE(state->texture_states[i]); ++j)
map = changed->textureState[i];
while (map)
{
if (changed->textureState[i] & (1u << j))
j = wined3d_bit_scan(&map);
wined3d_device_set_texture_stage_state(device, i, j, state->texture_states[i][j]);
}
}
......
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