[PATCH 4/5] wined3d: Don't use the depth range clipping hack when we have ARB_depth_clamp.

Chris Robinson chris.kcat at gmail.com
Tue Jan 19 18:08:00 CST 2010

On Tuesday 19 January 2010 3:37:50 pm Henri Verbeet wrote:
> 2010/1/20 Chris Robinson <chris.kcat at gmail.com>:
> > I think you need to make sure glEnable(GL_DEPTH_CLAMP) gets called in
> > state_clipping if you're going to bypass the depth range hack with it.
> > Currently it's only called if WINED3DRS_CLIPPING is off.
> Possibly, but it's not clear from the description of that hack that
> it's required. The code certainly doesn't disable user clip planes
> either.

The comment says that it's using MinZ/MaxZ to suppress depth clipping, which 
could otherwise occur with 0..-1. GL_DEPTH_CLAMP needs to be enabled if 
'untransformed' is false, to suppress depth clipping as intended.

Since the transformed-vertex path is there to bypass transformation and 
frustum clipping, it would make sense to clamp and disable user clip planes, 
too (but as you said, that's not current behavior, so may need to be tested; 
same for viewport clipping).

More information about the wine-devel mailing list