glsl: Conditionalize atan2 math.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 19 Jan 2016 23:07:52 +0000 (15:07 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 23 Jan 2016 05:03:00 +0000 (21:03 -0800)
commitae9f73ea40094fe3010b3a774595f72fe87a10db
tree7b3d7737141cd02f4013129bf84584f6be86a24d
parent7ee89547533820eff3ff496dca10887cb2a8501b
glsl: Conditionalize atan2 math.

In the old hand-writen implementation of atan2, the calculation of
atan(y/x) was performed conditionally in the "then" block of the
outermost if statement.  I believe I accidentally lifted this out
into unconditional code when converting to IR builder.

For reference, the original hand-written IR is visible in commit
722eff674b832e2321f791c68358ef52d2a1ff25.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: Erik Faye-Lund <kusmabite@gmail.com>
src/glsl/builtin_functions.cpp