Mesa (master): vc4: Enable NIR's lower_fmod option.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 5 23:56:31 UTC 2019


Module: Mesa
Branch: master
Commit: e0641e0728aa21b884408794abff07857824cc6f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e0641e0728aa21b884408794abff07857824cc6f

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Jun  3 23:06:49 2019 -0700

vc4: Enable NIR's lower_fmod option.

Currently, st/mesa is always calling the GLSL IR lower_instructions()
pass with MOD_TO_FLOOR set, so mod operations will be lowered before
ever reaching NIR.  This enables the same lowering at the NIR level,
which will let me shut off the GLSL IR path for NIR-based drivers.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Acked-by: Eric Anholt <eric at anholt.net>

---

 src/gallium/drivers/vc4/vc4_program.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index ecfdbac2f7c..707fa1d27ed 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -2189,6 +2189,7 @@ static const nir_shader_compiler_options nir_options = {
         .lower_fdiv = true,
         .lower_ffma = true,
         .lower_flrp32 = true,
+        .lower_fmod = true,
         .lower_fpow = true,
         .lower_fsat = true,
         .lower_fsqrt = true,




More information about the mesa-commit mailing list