[Mesa-dev] [Bug 97231] GL_DEPTH_CLAMP doesn't clamp to the far plane

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Aug 9 03:10:22 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=97231

--- Comment #10 from Roland Scheidegger <sroland at vmware.com> ---
(In reply to Jules Blok from comment #9)
> (In reply to Roland Scheidegger from comment #8)
> > So I think you're doing something unusual. With my earlier quick look, it
> > seemed like maybe you're relying on getting the clamped values already as
> > fragcoord.z in the shader?
> 
> We don't rely on that, we explicitly do our own clamping on gl_FragCoord.z
> in the pixel shader.
Ok. Albeit I'm actually missing that in the spec, if you do use early depth
test, does that still not change the value you see in the fs?

I actually looked again at what llvmpipe really does, and now honestly I've no
idea how this passes the piglit test. The problem is that we're actually only
doing depth clamp when we write depth in the fs - otherwise that code is
skipped (and the piglit test doesn't do that). Looks incorrect to me (you still
get another clamp against a max value of a fixed 1.0 elsewhere).
I might be able to look into fixing it, though an apitrace which actually works
would be helpful.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160809/688f99f6/attachment.html>


More information about the mesa-dev mailing list