Hi,

On Monday, September 15, 2014 18:11:51 Roland Scheidegger wrote:
> btw I'm not entirely sure everything is really correct with llvmpipe wrt
> that extension (the rasterization stuff, gallium isn't involved in the
> texture conversion). There's some very annoying differences how things
> work between d3d10 and GL there (I suspect there's actually bugs wrt
> d3d10 too especially when outputting depth from the pixel shader but so
> far we got away with it).
> So, with old style GL rendering, you can't actually produce depth values
> outside 0/1, due to clipping. But this is no longer true since a while
> for various reasons - fragment shader writing depth, ARB_depth_clamp,
> clip control... There's various places such values are clamped later -
> with ARB_depth_clamp if enabled they are clamped to min/max depth range
> (hence not outside 0/1 unless using the nv extension), I'm pretty sure
> there's also a 0/1 clamp elsewhere if you output depth from a fragment
> shader.
> With d3d10, you can likewise disable clipping, but there's no 0/1 clamp
> anywhere in sight (just to value range reproducible by depth buffer
> format), and the depth clamp is always enabled, regardless any depth
> clip enable / disable bits (clamping to the zmin/max range, which is not
> limited).
> In any case, I think there's a lot of possiblities of subtle bugs when
> trying to support this extension.

Hmm, I tend to agree with what you are saying.
Anyway, I am after the behavior of a projection matrix ranging from close
to far away, providing a decent depth precision. Using the trick described
in the earlier reference and shown in the piglit test does this.
The nice thing is that a huge range of today available drivers out in the
wild support this trick without any performance impact.
So, if I had an alternative there with the same properties, I would have
never tried this.
... and still, I you know an alternative, that I just do not see/know, tell me!

Greetings

Mathias
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to