r600/sfn: Add algebraic lowering for fsin and fcos
authorGert Wollny <gert.wollny@collabora.com>
Sat, 6 Mar 2021 15:10:55 +0000 (16:10 +0100)
committerGert Wollny <gert.wollny@collabora.com>
Mon, 22 Mar 2021 14:19:46 +0000 (15:19 +0100)
commit195952786b08fc76855b5b3015cf1e1d2c862944
tree915629e392dac6e769aff9f550dd4c7ea2ff21d6
parent318701b80399222457abd013bf797d744675ef58
r600/sfn: Add algebraic lowering for fsin and  fcos

* fsin and fcos require normalization of the input
* bitfield_insert requires an additional shift of the insert value

v2: drop bitfield_insert lowering code, it is already avaibable as
    compiler option (Rhys Perry)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452>
src/gallium/drivers/r600/Android.mk
src/gallium/drivers/r600/Makefile.sources
src/gallium/drivers/r600/meson.build
src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.h
src/gallium/drivers/r600/sfn/sfn_nir.cpp
src/gallium/drivers/r600/sfn/sfn_nir.h
src/gallium/drivers/r600/sfn/sfn_nir_algebraic.py [new file with mode: 0644]