vc4: Enable NIR's lower_fmod option.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 4 Jun 2019 06:06:49 +0000 (23:06 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 5 Jun 2019 23:45:12 +0000 (16:45 -0700)
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@amd.com>
Acked-by: Eric Anholt <eric@anholt.net>
src/gallium/drivers/vc4/vc4_program.c

index ecfdbac2f7c7c28da7af33e6cc972b2a238cc758..707fa1d27ed2282b8edaec8b101b0c730be9a7c8 100644 (file)
@@ -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,