r300: Amnesia the Dark Descent slowdown since NIR loop unrolling
There is quite noticeable slowdown in Amnesia, depending on the settings/area/GPU could be maybe over 10% (there is no benchmark mode AFAIK, so this was just some crude measuring, but it is noticeable enough to be bisectable). The bisect points to dc2edb8f r300: disable GLSL IR loop unrolling
and dumping the shaders and comparing before and after shows that for some specific shaders, we now end with double the instructions, so this seems like another deficiency of the NIR loop unrolling that I did not spot in time, CC @tarceri .
Here is the worst regressed shader:79.shader_test (the game is opensource now: https://frictionalgames.com/2020-09-amnesia-is-now-open-source/)
with RV530: instructions HURT: shaders/amnesia-tdd/79.shader_test FS: 18 -> 39 (116.67%)
NIR_DEBUG=print before:amnesia-nir-good.txt and after:amnesia-nir-bad.txt