[PATCH v4 6/6] d3d10: Add tests for scalar and vector effect variables.

Matteo Bruni matteo.mystral at gmail.com
Tue Feb 25 11:41:56 CST 2020


On Mon, Feb 17, 2020 at 10:22 PM Connor McAdams <conmanx360 at 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).



More information about the wine-devel mailing list