From d5e5f72e06165928ee5d9f13d0de7d73038daa0e Mon Sep 17 00:00:00 2001 From: Jose Maria Casanova Crespo Date: Fri, 9 Oct 2020 18:40:45 +0200 Subject: [PATCH] vc4: Enable lower_umax and lower_umin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VC4 doesn't have support for UMAX and UMIN integer operations. So we should avoid algebraic optimizations that generate umax/umin ops. Fixes: 8e1b75b330954a ("nir/algebraic: optimize iand/ior of (n)eq zero") Reviewed-by: Alejandro PiƱeiro Part-of: --- src/gallium/drivers/vc4/vc4_program.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 8bffb1d3840..ef472536966 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -2191,6 +2191,8 @@ static const nir_shader_compiler_options nir_options = { .lower_negate = true, .lower_rotate = true, .lower_to_scalar = true, + .lower_umax = true, + .lower_umin = true, .max_unroll_iterations = 32, };