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

Connor McAdams conmanx360 at gmail.com
Tue Feb 25 15:05:44 CST 2020


Didn't even think of that. You're correct, if you use SetInt, and then
GetFloat, you'll get the integer value back as a float, and not
interpreted as one.

d3dx9_private.h should be useful as a reference, thanks for that.

If I shouldn't print the expected value, should I still print the
returned value?

I'll get started on a v5 series soon. Thanks for the review.

On Tue, Feb 25, 2020 at 12:42 PM Matteo Bruni <matteo.mystral at gmail.com> wrote:
>
> 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