<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 - Shadows are flickering in SuperTuxKart"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110395">110395</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Shadows are flickering in SuperTuxKart
          </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/DRI/i965
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>deveee@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In current git STK grass shadows are constantly flickering.

Here is original bug report:
<a href="https://github.com/supertuxkart/stk-code/issues/3824">https://github.com/supertuxkart/stk-code/issues/3824</a>

Basically it is related to the file:
<a href="https://github.com/supertuxkart/stk-code/blob/master/data/shaders/sp_grass_shadow.vert">https://github.com/supertuxkart/stk-code/blob/master/data/shaders/sp_grass_shadow.vert</a>

I can "fix" this by changing order of the "layer" and "wind_direction" uniform
variables. Maybe it's just a case.

And it can be reproduced on any track with grass/trees when shadows are enabled
in options, eg. in Nessie's Pond.

Not sure which graphics cards are affected. Maybe <= gen8, because original bug
report is from haswell and I was testing it on ivybridge.

Git bisect shows:

eca4a6548d07bbbb02a7768edb397bad7b72cfc2 is the first bad commit
commit eca4a6548d07bbbb02a7768edb397bad7b72cfc2
Author: Danylo Piliaiev <<a href="mailto:danylo.piliaiev@gmail.com">danylo.piliaiev@gmail.com</a>>
Date:   Mon Jul 2 17:04:23 2018 +0300

    i965: Disable dual source blending when shader doesn't support it on gen8+

    Dual source blending behaviour is undefined when shader doesn't
    have second color output, dismissing fragment in such situation
    leads to a hang on gen8+ if depth test in enabled.

    Since blending cannot be gracefully fixed in such case and the result
    is undefined - blending is simply disabled.

    v2 (Kenneth Graunke):
     - Listen to BRW_NEW_FS_PROG_DATA in 3DSTATE_PS_BLEND
     - Also whack BLEND_STATE[] to keep the two in sync, since we're not
       sure exactly which copy of the redundant info the hardware will use.

    Bugzilla: <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [GEN8+] Hang when discarding a fragment if dual source blending is enabled but shader doesn't support it"
   href="show_bug.cgi?id=107088">https://bugs.freedesktop.org/show_bug.cgi?id=107088</a>
    Signed-off-by: Danylo Piliaiev <<a href="mailto:danylo.piliaiev@globallogic.com">danylo.piliaiev@globallogic.com</a>>
    Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>>
    Reviewed-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>>

:040000 040000 e4887675a8acfdd017f7022f553a8bfeefc2b31b
8eb8649a23e09c70cb3088873249763e05f5452e M      src</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>