Roderick Colenbrander : wined3d: Add a helper function for getting a valid rectangle.