Re: [Mesa-dev] [PATCH] glsl: Fix isinf() for non-C99-compliant compilers.

2012-01-19 Thread Ian Romanick
On 01/18/2012 01:09 PM, Paul Berry wrote: On 18 January 2012 12:43, Jose Fonseca mailto:jfons...@vmware.com>> wrote: Looks good to me. Thanks Should there be a case for -INF while we are at it? I think you can make arguments both for and against. On the one hand, C99 requires strtod

Re: [Mesa-dev] [PATCH] glsl: Fix isinf() for non-C99-compliant compilers.

2012-01-18 Thread Kenneth Graunke
On 01/18/2012 12:32 PM, Paul Berry wrote: Commit ede60bc4670a8d9c14921c77abee1ac57fc0e6bf (glsl: Add isinf() and isnan() builtins) uses "+INF" in the .ir file to represent infinity. This worked on C99-compliant compilers, since the s-expression reader uses strtod() to read numbers, and C99 requir

Re: [Mesa-dev] [PATCH] glsl: Fix isinf() for non-C99-compliant compilers.

2012-01-18 Thread Paul Berry
On 18 January 2012 12:43, Jose Fonseca wrote: > Looks good to me. Thanks > > Should there be a case for -INF while we are at it? > I think you can make arguments both for and against. On the one hand, C99 requires strtod to recognize "INF", "+INF", "-INF", "INFINITY", "+INFINITY", "-INFINITY",

Re: [Mesa-dev] [PATCH] glsl: Fix isinf() for non-C99-compliant compilers.

2012-01-18 Thread Jose Fonseca
Looks good to me. Thanks Should there be a case for -INF while we are at it? Jose - Original Message - > Commit ede60bc4670a8d9c14921c77abee1ac57fc0e6bf (glsl: Add isinf() > and > isnan() builtins) uses "+INF" in the .ir file to represent infinity. > This worked on C99-compliant compiler

[Mesa-dev] [PATCH] glsl: Fix isinf() for non-C99-compliant compilers.

2012-01-18 Thread Paul Berry
Commit ede60bc4670a8d9c14921c77abee1ac57fc0e6bf (glsl: Add isinf() and isnan() builtins) uses "+INF" in the .ir file to represent infinity. This worked on C99-compliant compilers, since the s-expression reader uses strtod() to read numbers, and C99 requires strtod() to understand "+INF". However,