See my other email implementing sysvals. That avoids changing the state tracker in uncomfortable ways or having special uniforms introduced. Lima should implement sysvals too, not just for viewport but also for emulating certain desktop functionality. See what vc4/v3d/freedreno do with sysvals for some ideas.