<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Glitches with soft shadows and MSAA in Knights of the Old Republic 2"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93767">93767</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Glitches with soft shadows and MSAA in Knights of the Old Republic 2
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/Gallium/radeonsi
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>daniel@constexpr.org
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=121127" name="attach_121127" title="Screenshot of the glitch">attachment 121127</a> <a href="attachment.cgi?id=121127&action=edit" title="Screenshot of the glitch">[details]</a></span>
Screenshot of the glitch

When enabling both soft shadows and antialiasing in Knights of the Old Republic
2 [0], there are lines visible in addition to the shadows.

Here is an apitrace showing the problem:

 <a href="http://constexpr.org/tmp/KotOR2-shadows-radeonsi.trace.xz">http://constexpr.org/tmp/KotOR2-shadows-radeonsi.trace.xz</a> (37 MiB)

The same trace (and the game) render fine with Catalyst 15.12.

Disabling either soft shadows or antialiasing also fixes the rendering.

GPU: Radeon HD 7950 (TAHITI)
Mesa 11.2.0-devel (git-d018619)
LLVM r255414

>From what I can tell the problem first appears in e.g. draw call 1919333 in my
trace - the stencil buffer has value 127 everywhere except for parts covered by
the shadow volumes. The color buffer however contains jagged lines afterwards
in addition to the pixels covered by the shadows.

NB: The game also has fog issues like those worked around in the ATI_fs
implementation [1] for the first KotOR game, but they are also present with
Catalyst and even in one of the official screenshots [2] on the game's Steam
store page. I think its fair to assume that that is a game bug, but if anyone
wants to try it out with another driver / HW, here is another apitrace:

 <a href="http://constexpr.org/tmp/KotOR2-fog-radeonsi.trace.xz">http://constexpr.org/tmp/KotOR2-fog-radeonsi.trace.xz</a> (35 MiB)

[0] <a href="http://store.steampowered.com/app/208580/">http://store.steampowered.com/app/208580/</a>
[1] <a href="http://lists.freedesktop.org/archives/mesa-dev/2015-December/103263.html">http://lists.freedesktop.org/archives/mesa-dev/2015-December/103263.html</a>
[2]
<a href="http://cdn.akamai.steamstatic.com/steam/apps/208580/ss_e2043ae5d872d5576fd160acb3aa1169a5d0222c.1920x1080.jpg?t=1451421385">http://cdn.akamai.steamstatic.com/steam/apps/208580/ss_e2043ae5d872d5576fd160acb3aa1169a5d0222c.1920x1080.jpg?t=1451421385</a></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>