On Mon, Feb 17, 2020 at 10:22 PM Connor McAdams conmanx360@gmail.com wrote:
- f0->lpVtbl->SetFloat(f0, 5.0f);
- f0->lpVtbl->GetFloat(f0, &f0_ret);
- ok(f0_ret == 5.0f, "f0 is %f, expected %f.\n", f0_ret, 5.0f);
What happens if you call e.g. SetInt() here? Patch 2/6 suggests that it would "reinterpret" the value as a float rather than convert it (which is what happens in d3dx9 for example). Some quick testing suggests that d3d10 keeps the d3dx9 behavior, so the implementation should be updated accordingly. For reference you can look up set_number() in d3dx9_private.h.
Additional nitpicks: those calls could use an ok() check for the return value; don't print the expected value when it's obvious from the code + failed test line (like in this case).