Hi Rico, I compiled the 32 bit wine tests on win7 64 bit using cygwin, and sure enough, there are 40 test failures there. You should probably avoid doing direct equality tests on floats; see e.g. compare() at line 47 of d3dx9_36/tests/mesh.c. You may have to tweak the slop value. (Google floating point comparison if you want the gory details of how tools like google test and boost's test_tools do it right.)
effect.c:894: Test failed: 0 - f3: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:1142: Test failed: 0 - f3: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 0 - f3: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 0 - f3: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:894: Test failed: 0 - f4: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:894: Test failed: 0 - f4: GetValue value[3] failed, got 0x3df8f8fa, expected 0x3df8f8f9 effect.c:1142: Test failed: 0 - f4: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1142: Test failed: 0 - f4: GetFloatArray favalue[3] failed, got 0.121569, expected 0.121569 effect.c:1211: Test failed: 0 - f4: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 0 - f4: GetVector fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:1461: Test failed: 0 - f4: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 0 - f4: GetMatrixTranspose fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:894: Test failed: 0 - f31: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:1142: Test failed: 0 - f31: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1321: Test failed: 0 - f31: GetMatrix fvalue[8] failed, got 0.203922, expected 0.203922 effect.c:1438: Test failed: 0 - f31: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:894: Test failed: 0 - f41: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:894: Test failed: 0 - f41: GetValue value[3] failed, got 0x3df8f8fa, expected 0x3df8f8f9 effect.c:1142: Test failed: 0 - f41: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1142: Test failed: 0 - f41: GetFloatArray favalue[3] failed, got 0.121569, expected 0.121569 effect.c:1321: Test failed: 0 - f41: GetMatrix fvalue[8] failed, got 0.203922, expected 0.203922 effect.c:1321: Test failed: 0 - f41: GetMatrix fvalue[12] failed, got 0.121569, expected 0.121569 effect.c:1438: Test failed: 0 - f41: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1438: Test failed: 0 - f41: GetMatrixTranspose fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:894: Test failed: 3 - f3: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:1142: Test failed: 3 - f3: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 3 - f3: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 3 - f3: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:894: Test failed: 3 - f3min: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:1142: Test failed: 3 - f3min: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 3 - f3min: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 3 - f3min: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:894: Test failed: 3 - f3max: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:1142: Test failed: 3 - f3max: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 3 - f3max: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 3 - f3max: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:894: Test failed: 3 - f4: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:894: Test failed: 3 - f4: GetValue value[3] failed, got 0x3df8f8fa, expected 0x3df8f8f9 effect.c:1142: Test failed: 3 - f4: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1142: Test failed: 3 - f4: GetFloatArray favalue[3] failed, got 0.121569, expected 0.121569 effect.c:1211: Test failed: 3 - f4: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 3 - f4: GetVector fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:1461: Test failed: 3 - f4: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 3 - f4: GetMatrixTranspose fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:894: Test failed: 3 - f4min: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:894: Test failed: 3 - f4min: GetValue value[3] failed, got 0x3df8f8fa, expected 0x3df8f8f9 effect.c:1142: Test failed: 3 - f4min: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1142: Test failed: 3 - f4min: GetFloatArray favalue[3] failed, got 0.121569, expected 0.121569 effect.c:1211: Test failed: 3 - f4min: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 3 - f4min: GetVector fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:1461: Test failed: 3 - f4min: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 3 - f4min: GetMatrixTranspose fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:894: Test failed: 3 - f4max: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:894: Test failed: 3 - f4max: GetValue value[3] failed, got 0x3df8f8fa, expected 0x3df8f8f9 effect.c:1142: Test failed: 3 - f4max: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1142: Test failed: 3 - f4max: GetFloatArray favalue[3] failed, got 0.121569, expected 0.121569 effect.c:1211: Test failed: 3 - f4max: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 3 - f4max: GetVector fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:1461: Test failed: 3 - f4max: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 3 - f4max: GetMatrixTranspose fvalue[3] failed, got 0.121569, expected 0.121569 effect: 1222410 tests executed (0 marked as todo, 60 failures), 0 skipped.
Hi,
thank you all for the tests (also to those who haven't replied to wine-devel). With the data I figured out how to solve the test results in this test.
In general I'd like to be as exact as possible with the implementation and in this case the values look always the same in all logs I got. There are of curse examples where a compare function is a must have, but I don't think it's needed here. I asked to test, because my goal was to figure out, if the results are equal on all systems and that seems to be the case here. The small difference comes from a "implementation mistake" from my own implementation, I took accidentally the values from the wrong implementation, with that fixed, all tests should pass.
Thanks Rico
Am 20.11.2011 18:57, schrieb Dan Kegel:
Hi Rico, I compiled the 32 bit wine tests on win7 64 bit using cygwin, and sure enough, there are 40 test failures there. You should probably avoid doing direct equality tests on floats; see e.g. compare() at line 47 of d3dx9_36/tests/mesh.c. You may have to tweak the slop value. (Google floating point comparison if you want the gory details of how tools like google test and boost's test_tools do it right.)
effect.c:894: Test failed: 0 - f3: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:1142: Test failed: 0 - f3: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 0 - f3: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 0 - f3: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:894: Test failed: 0 - f4: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:894: Test failed: 0 - f4: GetValue value[3] failed, got 0x3df8f8fa, expected 0x3df8f8f9 effect.c:1142: Test failed: 0 - f4: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1142: Test failed: 0 - f4: GetFloatArray favalue[3] failed, got 0.121569, expected 0.121569 effect.c:1211: Test failed: 0 - f4: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 0 - f4: GetVector fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:1461: Test failed: 0 - f4: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 0 - f4: GetMatrixTranspose fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:894: Test failed: 0 - f31: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:1142: Test failed: 0 - f31: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1321: Test failed: 0 - f31: GetMatrix fvalue[8] failed, got 0.203922, expected 0.203922 effect.c:1438: Test failed: 0 - f31: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:894: Test failed: 0 - f41: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:894: Test failed: 0 - f41: GetValue value[3] failed, got 0x3df8f8fa, expected 0x3df8f8f9 effect.c:1142: Test failed: 0 - f41: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1142: Test failed: 0 - f41: GetFloatArray favalue[3] failed, got 0.121569, expected 0.121569 effect.c:1321: Test failed: 0 - f41: GetMatrix fvalue[8] failed, got 0.203922, expected 0.203922 effect.c:1321: Test failed: 0 - f41: GetMatrix fvalue[12] failed, got 0.121569, expected 0.121569 effect.c:1438: Test failed: 0 - f41: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1438: Test failed: 0 - f41: GetMatrixTranspose fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:894: Test failed: 3 - f3: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:1142: Test failed: 3 - f3: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 3 - f3: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 3 - f3: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:894: Test failed: 3 - f3min: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:1142: Test failed: 3 - f3min: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 3 - f3min: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 3 - f3min: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:894: Test failed: 3 - f3max: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:1142: Test failed: 3 - f3max: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 3 - f3max: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 3 - f3max: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:894: Test failed: 3 - f4: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:894: Test failed: 3 - f4: GetValue value[3] failed, got 0x3df8f8fa, expected 0x3df8f8f9 effect.c:1142: Test failed: 3 - f4: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1142: Test failed: 3 - f4: GetFloatArray favalue[3] failed, got 0.121569, expected 0.121569 effect.c:1211: Test failed: 3 - f4: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 3 - f4: GetVector fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:1461: Test failed: 3 - f4: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 3 - f4: GetMatrixTranspose fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:894: Test failed: 3 - f4min: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:894: Test failed: 3 - f4min: GetValue value[3] failed, got 0x3df8f8fa, expected 0x3df8f8f9 effect.c:1142: Test failed: 3 - f4min: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1142: Test failed: 3 - f4min: GetFloatArray favalue[3] failed, got 0.121569, expected 0.121569 effect.c:1211: Test failed: 3 - f4min: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 3 - f4min: GetVector fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:1461: Test failed: 3 - f4min: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 3 - f4min: GetMatrixTranspose fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:894: Test failed: 3 - f4max: GetValue value[2] failed, got 0x3e50d0d2, expected 0x3e50d0d1 effect.c:894: Test failed: 3 - f4max: GetValue value[3] failed, got 0x3df8f8fa, expected 0x3df8f8f9 effect.c:1142: Test failed: 3 - f4max: GetFloatArray favalue[2] failed, got 0.203922, expected 0.203922 effect.c:1142: Test failed: 3 - f4max: GetFloatArray favalue[3] failed, got 0.121569, expected 0.121569 effect.c:1211: Test failed: 3 - f4max: GetVector fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1211: Test failed: 3 - f4max: GetVector fvalue[3] failed, got 0.121569, expected 0.121569 effect.c:1461: Test failed: 3 - f4max: GetMatrixTranspose fvalue[2] failed, got 0.203922, expected 0.203922 effect.c:1461: Test failed: 3 - f4max: GetMatrixTranspose fvalue[3] failed, got 0.121569, expected 0.121569 effect: 1222410 tests executed (0 marked as todo, 60 failures), 0 skipped.