[PATCH 1/2] wined3d: Handle degenerate viewport Z ranges.
Henri Verbeet
hverbeet at gmail.com
Mon Nov 18 11:02:36 CST 2019
On Mon, 18 Nov 2019 at 18:54, Paul Gofman <gofmanp at 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.
More information about the wine-devel
mailing list