wined3d: Optimize scanning changed texture states in wined3d_device_apply_stateblock().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1cea81d104
commit
ebc96e32bd
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue