nir: SSBO array length fixes and optimizations.
Before, if the ssbo is too large this would always return 0. Also, this code is easier to optimize, so the common case of offset 0 and pot stride results in one ushr instead of 5+ instructions.
Foz-DB Navi21:
Totals from 258 (0.19% of 134913) affected shaders:
CodeSize: 2150956 -> 2139276 (-0.54%)
Instrs: 415649 -> 412863 (-0.67%)
Latency: 3222118 -> 3216140 (-0.19%); split: -0.19%, +0.01%
InvThroughput: 518964 -> 518042 (-0.18%); split: -0.19%, +0.01%
SClause: 23375 -> 23259 (-0.50%); split: -0.51%, +0.01%
Copies: 32080 -> 32097 (+0.05%); split: -0.15%, +0.21%
Edited by Georg Lehmann