On Wed Mar 29 13:42:09 2023 +0000, Nikolay Sivov wrote:
pass p15 { SetBlendState( NULL, asin(g_var.x), 0 ); }
f[0] = 0.1234567f; 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); ok(blend_factor[0] == asinf(f[0]), "Got unexpected blend_factor[0] %.8e.\n", blend_factor[0]); ok(!sample_mask, "Got unexpected sample_mask %#x.\n", sample_mask);
This matches on Windows, changing to asin() fails the test. I pushed the change to all of such newly added functions, not sure if it's worth it to add such a test, because this is assuming crt that tests exe links to, and also it does not fail on Wine with asin().
Cool. I think we want to try to upstream this kind of tests for now, if we start to see test failures we can make the tests laxer (e.g. introducing something like compare_float() from the d3d11 tests) or drop them selectively, depending.
Thanks for looking into it :)