wined3d: Use a common function for all D3DCMPFUNC -> GLenum conversions.