summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Maria Casanova Crespo <jmcasanova@igalia.com>2020-10-10 12:19:39 +0100
committerJose Maria Casanova Crespo <jmcasanova@igalia.com>2020-10-11 11:46:43 +0200
commit7346933fc8616ec2adc9848d267cee873f2eabb8 (patch)
treed17abddd21a6298d7ccbeaba2977630d54d81bd2
parentb7d16adcbe0b1052dc16dc2447f1964ef972f37f (diff)
vc4: enable lower_isign for VC4
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 <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7089>
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c1
1 files changed, 1 insertions, 0 deletions
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,
};