<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Flickering Shadows in The Talos Principle"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93594#c16">Comment # 16</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Flickering Shadows in The Talos Principle"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93594">bug 93594</a>
              from <span class="vcard"><a class="email" href="mailto:nhaehnle@gmail.com" title="Nicolai Hähnle <nhaehnle@gmail.com>"> <span class="fn">Nicolai Hähnle</span></a>
</span></b>
        <pre>Interesting information about D3D10, thank you.

The GLSL 4.50 spec says:

"The discard keyword is only allowed within fragment shaders. It can be used
within a fragment shader to abandon the operation on the current fragment. This
keyword causes the fragment to be discarded and no updates to any buffers will
occur. Control flow exits the shader, and subsequent implicit or explicit
derivatives are undefined when this exit is non-uniform."

One annoying aspect of this language is that one can reasonably read it as
non-uniformity only being relevant for non-helper fragments. If a pixel quad is
partial covered by the original primitive, and discard is used in a way that
keeps the covered pixels but discard the helper ones, should derivatives be
defined or not?

As Michel said, I am indeed currently working on a patch changing exec mask
behavior in LLVM for stores and atomics in pixel shaders. While what I have so
far does not fix this bug yet, it already requires switching back and forth
between WQM and non-WQM/"exact" modes. Extending this to keep full quads alive
after KILL_IF should not add much more overhead.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>