lima: lower fmod in ppir and gpir
authorErico Nunes <nunes.erico@gmail.com>
Sat, 15 Jun 2019 13:41:05 +0000 (15:41 +0200)
committerErico Nunes <nunes.erico@gmail.com>
Sun, 16 Jun 2019 10:11:59 +0000 (10:11 +0000)
commitd72bbb2c8969732c86cbeba58ddf0ff83be07f72
tree49153e922beb2b689604934859f52a67c084a36d
parenta417c323adec50c7d5abb5d6a7e511dbb96b57b8
lima: lower fmod in ppir and gpir

Since commit 4f3c82c72c5 fmod is no longer being lowered in nir, and
ends up crashing lima programs with "unsupported nir_op: fmod" in both
ppir and gpir.
There seems to be no mod operation in hardware in utgard and there is an
optimization in nir to lower fmod to instructions that lima already
implements, so let's use that.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
src/gallium/drivers/lima/lima_program.c