`ED_view3d_win_to_ray_clipped_ex` requires `ray_end` when `do_clip_planes` is true. Since the snap code uses `ray_depth` instead of `ray_end`, the solution is to always calculate the `ray_end` and convert to `ray_depth` when necessary.
`ED_view3d_win_to_ray_clipped_ex` requires `ray_end` when `do_clip_planes` is true. Since the snap code uses `ray_depth` instead of `ray_end`, the solution is to always calculate the `ray_end` and convert to `ray_depth` when necessary.