Такие вещи вообще оптимизируются?
for (i = 0; i < d3d_info->limits.vs_uniform_count; ++i)
{
if (stateblock->changed.vertexShaderConstantsF[i])
{
stateblock->contained_vs_consts_f[stateblock->num_contained_vs_consts_f] = i;
++stateblock->num_contained_vs_consts_f;
}
}
for (i = 0; i < stateblock->num_contained_vs_consts_f; ++i)
{
unsigned int idx = stateblock->contained_vs_consts_f[i];
TRACE("Setting vs_consts_f[%u] to {%.8e, %.8e, %.8e, %.8e}.\n", idx,
src_state->vs_consts_f[idx * 4 + 0],
src_state->vs_consts_f[idx * 4 + 1],
src_state->vs_consts_f[idx * 4 + 2],
src_state->vs_consts_f[idx * 4 + 3]);
stateblock->state.vs_consts_f[idx * 4 + 0] = src_state->vs_consts_f[idx * 4 + 0];
stateblock->state.vs_consts_f[idx * 4 + 1] = src_state->vs_consts_f[idx * 4 + 1];
stateblock->state.vs_consts_f[idx * 4 + 2] = src_state->vs_consts_f[idx * 4 + 2];
stateblock->state.vs_consts_f[idx * 4 + 3] = src_state->vs_consts_f[idx * 4 + 3];
}
это wine/dlls/wined3d/stateblock.c