From: Kenneth Graunke Date: Tue, 4 Jun 2019 06:06:49 +0000 (-0700) Subject: vc4: Enable NIR's lower_fmod option. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e0641e0728aa21b884408794abff07857824cc6f;p=mesa.git 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 Acked-by: Eric Anholt --- 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,