<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - GL_DEPTH_CLAMP doesn't clamp to the far plane"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=97231#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - GL_DEPTH_CLAMP doesn't clamp to the far plane"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=97231">bug 97231</a>
              from <span class="vcard"><a class="email" href="mailto:sroland@vmware.com" title="Roland Scheidegger <sroland@vmware.com>"> <span class="fn">Roland Scheidegger</span></a>
</span></b>
        <pre>(In reply to Jules Blok from <a href="show_bug.cgi?id=97231#c9">comment #9</a>)
<span class="quote">> (In reply to Roland Scheidegger from <a href="show_bug.cgi?id=97231#c8">comment #8</a>)
> > 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.</span >
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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>