From e0641e0728aa21b884408794abff07857824cc6f Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 3 Jun 2019 23:06:49 -0700 Subject: [PATCH] vc4: Enable NIR's lower_fmod option. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- 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, -- 2.30.2