On Fri, Jun 24, 2011 at 10:19 AM, Stefan Dösinger stefandoesinger@gmx.at wrote:
On Friday 24 June 2011 16:01:21 Dylan Smith wrote:
On Fri, Jun 24, 2011 at 9:31 AM, Michael Stefaniuc mstefani@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.
Ya, visual studio reports a divide by zero error in this case :-/
I see. I suppose NAN isn't crucial to the tests (the point is the value is not checked), so I could assume the IEEE 745 standard since it shouldn't break the tests if this assumption is wrong.
So how about the revised patch that uses memset to set all the bits to 1.
On Fri, Jun 24, 2011 at 10:56 AM, Dan Kegel dank@kegel.com wrote:
Dylan wrote:
- exp_weights[1] = FP_NAN;
- exp_weights[1] = 0.0f / 0.0f;
It's a bit strange to see 0 being replaced with infinity. What is your intent in that line? FP_NAN probably isn't what you think it is.
0.0f / 0.0f seems to give NAN as a result, although using a comment or an appropriately named variable would make it more readable. The intent is to show that the value isn't checked, since usually weights are between 0.0 and 1.0.