Dylan Smith : d3dx9/tests: Added tests for D3DXCreateSkinInfo.
Dylan Smith
dylan.ah.smith at gmail.com
Fri Jun 24 09:01:21 CDT 2011
On Fri, Jun 24, 2011 at 9:31 AM, Michael Stefaniuc <mstefani at redhat.com> wrote:
> this commit breaks compilation on my old RHEL5 box:
> dlls/d3dx9_36/tests/mesh.c:4813: error: ‘FP_NAN’ undeclared (first use
> in this function)
Does the attached patch fix the problem. It uses 0.0f / 0.0f like in
wined3d_private.h.
On Fri, Jun 24, 2011 at 9:44 AM, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
> I'd appreciate a portable solution for generating NaN and Inf values as well,
> I have the same problem with wined3d in visual studio.
I don't see Inf values specified using a macro there, but good for
future reference.
-------------- next part --------------
commit a247dd5dbf40c859fb9a77352cc8f6c556c69cc8
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Fri Jun 24 09:53:57 2011 -0400
d3dx9/tests: Avoid using FP_NAN for portability.
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index a07cc9d..54ef66b 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -4809,7 +4809,7 @@ static void test_create_skin_info(void)
exp_vertices[0] = 0;
exp_vertices[1] = 0x87654321;
exp_weights[0] = 0.5;
- exp_weights[1] = FP_NAN;
+ exp_weights[1] = 0.0f / 0.0f;
num_influences = 2;
hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 1, num_influences, vertices, weights);
@@ -4834,7 +4834,7 @@ static void test_create_skin_info(void)
for (i = 0; i < num_influences; i++) {
ok(exp_vertices[i] == vertices[i],
"influence[%d]: expected vertex %u, got %u\n", i, exp_vertices[i], vertices[i]);
- ok(exp_weights[i] == weights[i],
+ ok(exp_weights[i] == weights[i] || (isnan(exp_weights[i]) && isnan(weights[i])),
"influence[%d]: expected weights %g, got %g\n", i, exp_weights[i], weights[i]);
}
More information about the wine-devel
mailing list