On Mon, 18 Nov 2019 at 18:54, Paul Gofman gofmanp@gmail.com wrote:
+static inline void wined3d_z_range_from_viewport(float *min_z, float *max_z, const struct wined3d_viewport *vp) +{
- *min_z = vp->min_z;
- /* The magic constant is derived from tests */
- *max_z = vp->min_z + max(vp->max_z - vp->min_z, 0.001f);
I think I'd prefer that as "*max_z = max(vp->max_z, vp->min_z + 0.001f);", and I'd probably call it wined3d_viewport_get_z_range(), with the viewport as first parameter.