Skip to content

etnaviv: nir: do not run opt loop after nir_lower_bool_xxx(..)

Running the optimizations after bool to float/int lowering is not going to work. Large portions of NIR are likely to blow up if they see floats/ints in weird places. Most of the bool->float/int conversions are direct instruction substitutions and it's not going to leave a lot of garbage around to optimize.

Fixes nir.h:261: nir_const_value_as_bool: Assertion `i == 0 || i == -1' failed dEQP-GLES2.functional.shaders.loops.while_constant_iterations.no_iterations_vertex

Here are shader-db results for GC2000:

total instructions in shared programs: 64220 -> 64572 (0.55%) instructions in affected programs: 4924 -> 5276 (7.15%) helped: 5 HURT: 24 helped stats (abs) min: 4 max: 8 x̄: 5.60 x̃: 4 helped stats (rel) min: 4.35% max: 5.41% x̄: 4.72% x̃: 4.35% HURT stats (abs) min: 4 max: 60 x̄: 15.83 x̃: 12 HURT stats (rel) min: 1.55% max: 16.67% x̄: 10.04% x̃: 10.71% 95% mean confidence interval for instructions value: 5.39 18.89 95% mean confidence interval for instructions %-change: 4.81% 10.18% Instructions are HURT.

total temps in shared programs: 2514 -> 2512 (-0.08%) temps in affected programs: 9 -> 7 (-22.22%) helped: 2 HURT: 0

Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Christian Gmeiner christian.gmeiner@gmail.com

Merge request reports