wined3d: Pass a wined3d_state pointer to state handlers.