wined3d: Move the primitive type to wined3d_state.