lima: lower fmod in ppir and gpir

Since commit 4f3c82c72c 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>
This commit is contained in:
Erico Nunes 2019-06-15 15:41:05 +02:00
parent a417c323ad
commit d72bbb2c89
1 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,7 @@ static const nir_shader_compiler_options vs_nir_options = {
.lower_fpow = true,
.lower_ffract = true,
.lower_fdiv = true,
.lower_fmod = true,
.lower_fsqrt = true,
.lower_sub = true,
.lower_flrp32 = true,
@ -56,6 +57,7 @@ static const nir_shader_compiler_options vs_nir_options = {
static const nir_shader_compiler_options fs_nir_options = {
.lower_fpow = true,
.lower_fdiv = true,
.lower_fmod = true,
.lower_sub = true,
.lower_flrp32 = true,
.lower_flrp64 = true,