summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/lima
diff options
context:
space:
mode:
authorErico Nunes <[email protected]>2019-06-15 15:41:05 +0200
committerErico Nunes <[email protected]>2019-06-16 10:11:59 +0000
commitd72bbb2c8969732c86cbeba58ddf0ff83be07f72 (patch)
tree49153e922beb2b689604934859f52a67c084a36d /src/gallium/drivers/lima
parenta417c323adec50c7d5abb5d6a7e511dbb96b57b8 (diff)
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 <[email protected]> Reviewed-by: Qiang Yu <[email protected]>
Diffstat (limited to 'src/gallium/drivers/lima')
-rw-r--r--src/gallium/drivers/lima/lima_program.c2
1 files changed, 2 insertions, 0 deletions
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,