From 732b28c8b1cd3e7815bacf8e3fe31461e514c397 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: (cherry picked from commit d5e5f72e06165928ee5d9f13d0de7d73038daa0e) --- .pick_status.json | 2 +- src/gallium/drivers/vc4/vc4_program.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 0d642859000..57809707fbd 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5908,7 +5908,7 @@ "description": "vc4: Enable lower_umax and lower_umin", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "8e1b75b330954a2e40e8ed0c04871e43120d4f4a" }, diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 9c89ef6843f..d59651b4a31 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -2190,6 +2190,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, };