3, 4.: It looks like currently all the state besides the mentioned render targets are handled in the per ddraw device stateblock which is applied before draw, or am I missing something? Should I probably just handle render targets per-draw?
I mean, if you do SetRenderState() on one device, and then GetRenderState() on another, I suspect that's not supposed to return the state that was set on the first device. But currently that's what this patch does; the state is stored in stateblock_state which is per ddraw.
Render target is a bit special since it doesn't go through wined3d_stateblock. It'd need to be set manually.