freedreno/a6xx: Re-write the function-of-doom

Re-write the program state building to align more closely with turnip,
for easier comparision.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
3 files changed