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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Aug 8 20:46:07 UTC 2016


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

--- Comment #8 from Roland Scheidegger <sroland at vmware.com> ---
(In reply to Jules Blok from comment #7)
> It seems you misunderstood me, it doesn't work with either reversed depth or
> normal depth on Mesa. So reverse depth has nothing to do with the issue, it
> was just a small thing I changed for reasons unrelated to this issue. I can
> reproduce the problem either way.

No I understood that just fine. What I'm saying is I'm pretty sure it is
totally busted if you do reverse depth range.
But if you don't do that, this feature is generally known to work with
llvmpipe. There's tests for this both on the gl (piglit) and d3d10 side (albeit
piglit doesn't seem to catch it won't work with reversed depth even though the
test does that...).
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? That's not going to happen (and I can't see why it
should, with d3d10 the language is explicit this happens when the depth values
arrive at the output merger stage, gl language is way more confusing but still
says it happens at depth test time, and you cannot force early depth tests with
llvmpipe).
If you're using (2^24 - 1) / (2^24) maybe there could also be precision issues,
albeit I would think it should survive the viewport scaling bits (should be
right at lsb of the float mantissa).

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


More information about the mesa-dev mailing list