nir: implement lowering for fsin and fcos
authorVasily Khoruzhick <anarsoul@gmail.com>
Sun, 7 Apr 2019 20:24:45 +0000 (13:24 -0700)
committerErico Nunes <nunes.erico@gmail.com>
Tue, 7 May 2019 15:25:21 +0000 (15:25 +0000)
commite67e4e90b2cac998d6a6ad15735499eddb4fbe5d
tree8c5ea2257875082287c7fdc44b1e6c72e9e199dc
parentb15c46e6bf4cd375ae0b580bd1a0ec139e8dd3ef
nir: implement lowering for fsin and fcos

Lower sin and cos using Nick's fast sin/cos approximation from
https://web.archive.org/web/20180105155939/http://forum.devmaster.net/t/fast-and-accurate-sine-cosine/9648

It's suitable for GLES2, but it throws warnings in dEQP GLES3 precision tests.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Tested-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
src/compiler/Makefile.sources
src/compiler/nir/meson.build
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_sincos.c [new file with mode: 0644]