From 7346933fc8616ec2adc9848d267cee873f2eabb8 Mon Sep 17 00:00:00 2001 From: Jose Maria Casanova Crespo Date: Sat, 10 Oct 2020 12:19:39 +0100 Subject: [PATCH] vc4: enable lower_isign for VC4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since 1e7d82c8813647 ("nir/algebraic: always lower idiv to shifts if bitops are allowed") idiv is lowered and generates a isign operation. VC4 HW doesn't support isign and lower_isign wasn't enabled. Enabling it fixes the regressions caused by this new optimization on piglit tests shaders/glsl-fs-loop-nested. Fixes: 1e7d82c8813647 ("nir/algebraic: always lower idiv to shifts if bitops are allowed") Reviewed-by: Alejandro PiƱeiro Part-of: --- 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 ef472536966..9cdcd6b0957 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -2193,6 +2193,7 @@ static const nir_shader_compiler_options nir_options = { .lower_to_scalar = true, .lower_umax = true, .lower_umin = true, + .lower_isign = true, .max_unroll_iterations = 32, };