Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/tests/effect.c:
+ { + unsigned int unexpected_values = 0; + + hr = effect->lpVtbl->GetValue(effect, param, tmp, sizeof(tmp)); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); + + for (k = 0; k < (param_desc.Bytes / 4); ++k) + { + const DWORD *expected_val = &raw_value_tests[i].expected_value.dword[k]; + DWORD *ret_val = &tmp[k]; + + if (param_desc.Type == D3DXPT_BOOL && (!!(*expected_val) != (*ret_val))) + unexpected_values++; + else if (param_desc.Type != D3DXPT_BOOL && memcmp(ret_val, expected_val, sizeof(*ret_val))) + unexpected_values++; + }
}
for (; k < ARRAY_SIZE(tmp); ++k)
{
if (tmp[k] != 0xffffffffu)
unexpected_values++;
}
I haven't checked if we already have a similar test for `GetValue()` though. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7505#note_97218