glsl/builtin: Add alternate versions of atan using new ops
authorNeil Roberts <nroberts@igalia.com>
Fri, 11 Oct 2019 16:06:34 +0000 (18:06 +0200)
committerNeil Roberts <nroberts@igalia.com>
Sat, 12 Oct 2019 07:43:18 +0000 (09:43 +0200)
commitcece947a8dfadbaed45a59f86d357afb50f25f48
treec71140f6543237d5bfedbb7f5450a92aa6657a8d
parent77f3fbb4aa3853785885de4f64e3d6e325b97af8
glsl/builtin: Add alternate versions of atan using new ops

Adds alternate versions of the atan builtin functions that use
ir_unop_atan and ir_binop_atan2 instead of inlining to the IR
implementation of the function. These alternatives are selected if the
IR is going to be consumed by NIR. In that case the IR ops will be
translated to the appropriate NIR op.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/compiler/glsl/builtin_functions.cpp