Matteo Bruni (@Mystral) commented about dlls/d3d10/tests/effect.c:
+ set_vec4(f, 4.0f, 9.0f, 0.0f, -2.0f); + hr = g_var->lpVtbl->SetFloatVector(g_var, f); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + + hr = pass->lpVtbl->Apply(pass, 0); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + ID3D10Device_OMGetBlendState(device, &blend_state, blend_factor, &sample_mask); + ok(!blend_state, "Unexpected blend state %p.\n", blend_state); + for (idx = 0; idx < ARRAY_SIZE(blend_factor); ++idx) + { + if (f[idx] == 0.0f) + ok(blend_factor[idx] == 0.0f, "Got unexpected blend_factor[%u] %.8e.\n", idx, blend_factor[idx]); + else + ok(blend_factor[idx] == logf(fabsf(f[idx])), "Got unexpected blend_factor[%u] %.8e.\n", idx, blend_factor[idx]); + } This is fine but I'd not be opposed to unrolling this particular instance and avoiding the branching.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4007#note_47568