r300: Request NIR shaders from mesa/st and use NIR-to-TGSI.
Not quite at no regressions yet, but looks like a significant improvement to the driver. From the NIR commit:
r300: Request NIR shaders from mesa/st and use NIR-to-TGSI.
This brings us into parity on state tracker paths with most other
supported drivers, and a lot of additional optimization on our shaders.
[...]
The temps (register usage) increase is unfortunate, but it seems that
instruction counts tend to be our limit before reg counts are.
Overall results on a subset of shader-db that doesn't crash:
instructions in affected programs: 59502 -> 47995 (-19.34%)
vinst in affected programs: 17633 -> 15201 (-13.79%)
sinst in affected programs: 9296 -> 7315 (-21.31%)
flowcontrol in affected programs: 627 -> 310 (-50.56%)
presub in affected programs: 4220 -> 1554 (-63.18%)
temps in affected programs: 5730 -> 8060 (40.66%)
lits in affected programs: 215 -> 37 (-82.79%)