Bug 80888

Summary: draw_cliptest_tmp.h computes zero/zero It is better to use NAN macro
Product: Mesa Reporter: Vittorio <zeccav>
Component: OtherAssignee: mesa-dev
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: medium    
Version: 10.2   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Vittorio 2014-07-04 05:50:11 UTC
draw_cliptest_tmp.h:180
"position[3] = zero / zero; /* MSVC doesn't accept 0.0 / 0.0 */"
is wrong in my opinion.
The NAN macro from math.h should be used instead
"position[3] = NAN;"
see man NAN.
I believe zero/zero is against any programming language standard that I know.
Comment 1 Roland Scheidegger 2014-07-04 06:27:29 UTC
Unfortunately msvc (at least pre 2013) doesn't support NAN.
There's only one other method I can think of to do it there which would be to use a float/uint union, set the uint to some nan bit pattern then use the float part. No idea if it would actually work and not really nicer neither.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.