vtn: Fix Modf.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 27 Jan 2016 22:20:47 +0000 (14:20 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 27 Jan 2016 22:21:08 +0000 (14:21 -0800)
commitf92a35d831cf54f2244d5510932fd17c97b02ce4
treef87e0fd756b00cd9a202756c933bb5c5c309518b
parent4acfc9effbe4513075881a045bdfbec8ad2433a4
vtn: Fix Modf.

We were botching this for negative numbers - floor of a negative rounds
the wrong way.  Additionally, both results are supposed to retain the
sign of the original.

To fix this, just take the abs of both values, then put the sign back.
There's probably a better way to do this, but this works for now.
src/glsl/nir/spirv/vtn_glsl450.c