jamienicol / glsl-optimizer

GLSL optimizer based on Mesa's GLSL compiler. Used in Unity for mobile shader optimization.
Other
9 stars 8 forks source link

Use isnan to test for NaN #3

Closed glandium closed 4 years ago

glandium commented 4 years ago

Other than being more better, the real reason behind this is subtle: Gecko has an extra test for these as per https://bugzilla.mozilla.org/show_bug.cgi?id=927430, which fails on this condition and suggests to use mozilla::IsNaN, which is equivalent to std::isnan.

glandium commented 4 years ago

Please don't merge yet. I just found out that it doesn't work on mac.

glandium commented 4 years ago

f3b4256 is good to go.

jamienicol commented 4 years ago

Thanks!