Skip to content

nir: improve loop unrolling after potential regression from NaN fixes

Timothy Arceri requested to merge tarceri/mesa:alg_inverse_compare into main

Ever since 4246c286 and 7d85dc4f loop unrolling can no longer depend on inot being eliminated from the loop terminator condition so we need to be able to handle it. Nothing really changed for GLSL after those commits because GLSL IR optimisations still eliminated the inot but for Vulkan drivers we were potentially not unrolling loops. When the GLSL IR optimisation was disabled it resulted in 292 loops no longer being unrolled in shader-db so its likely this has a real world impact for Vulkan drivers.

The final patch disables the GLSL IR optimisation. Honestly I don't know the rules around NaNs so it would be great if @idr or someone else that does could comment on that one.

Edited by Timothy Arceri

Merge request reports