Mostly for context, the long term plan was to move the fixed-function GL bits out of state.c, either into context_gl.c/adapter_gl.c or their own file, rather than moving the actual state objects out. (Or rename state.c to ffp_gl.c, and then move state objects from ffp_gl.c to a "new" file state.c, if you like.) The idea was also that this would happen naturally as part of other long term state management changes, like e.g. getting rid of the state tables.
The second one was basically what I was trying to do here.
I suppose I didn't see a particularly salient time to do the rename. I guess we could gradually move things to a new file, instead, but I suspect this is a little better, because we can still broadly keep many of the state callbacks by turning them into helpers, so that can preserve history.
I suppose moving state objects to device.c works, although it feels somewhat arbitrary to move state objects there and not everything else, like e.g. sampler objects or views. (In fact, I'm inclined to argue for moving things out of device.c where possible; it sometimes feels like a collection of miscellaneous functionality that actually belongs elsewhere to me.)
The thing is, by itself it's 228 lines of code, which seems a little too small to deserve its own file. That was the only reason I didn't do that.
I'd love to be able to split device.c but I'm not really sure how...