Mesa (master): lima: lower fmod in ppir and gpir
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jun 16 10:20:48 UTC 2019
Module: Mesa
Branch: master
Commit: d72bbb2c8969732c86cbeba58ddf0ff83be07f72
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d72bbb2c8969732c86cbeba58ddf0ff83be07f72
Author: Erico Nunes <nunes.erico at gmail.com>
Date: Sat Jun 15 15:41:05 2019 +0200
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 at gmail.com>
Reviewed-by: Qiang Yu <yuq825 at gmail.com>
---
src/gallium/drivers/lima/lima_program.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c
index 38776154edb..3247892c773 100644
--- a/src/gallium/drivers/lima/lima_program.c
+++ b/src/gallium/drivers/lima/lima_program.c
@@ -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,
More information about the mesa-commit
mailing list