<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:danylo.piliaiev@gmail.com" title="Danylo <danylo.piliaiev@gmail.com>"> <span class="fn">Danylo</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [i965] Downward causes GPU hangs and misrendering on Haswell"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104297">bug 104297</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>danylo.piliaiev@gmail.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEEDINFO
           </td>
           <td>NEW
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [i965] Downward causes GPU hangs and misrendering on Haswell"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104297#c38">Comment # 38</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [i965] Downward causes GPU hangs and misrendering on Haswell"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104297">bug 104297</a>
              from <span class="vcard"><a class="email" href="mailto:danylo.piliaiev@gmail.com" title="Danylo <danylo.piliaiev@gmail.com>"> <span class="fn">Danylo</span></a>
</span></b>
        <pre>Hello,

I'm not sure that there are still hangs, I have tested a demo version of
Downward and didn't experienced any.

However I have found at least two issues with tesselation control shader:

1) Unmatched outputs in TCS are being reduced to local variables, I made a fix,
see <a href="https://gitlab.freedesktop.org/mesa/mesa/merge_requests/59">https://gitlab.freedesktop.org/mesa/mesa/merge_requests/59</a> - it will be
probably merged soon.

2) The second is more interesting:
  In short: something is broken with vec4 TCS shader when registers are
spilled.

  Long version: 
    Consider next part of TCS:
    -----------
    layout(location=0) out vec4 out1[3];
    layout(location=1) out vec4 out2[3];

    void main() {
        out1[gl_InvocationID] = gl_in[gl_InvocationID].gl_Position;
        out2[gl_InvocationID] = gl_in[gl_InvocationID].gl_Position;

        barrier();

        if (out1[0] != out2[0] || out1[1] != out2[1] || out1[2] != out2[2]) {
            atomicCounterIncrement(mismatches);
        } else {
            atomicCounterIncrement(matches);
        }
    -----------

    While 'out1' should always match 'out2' it isn't the case when launching on
any platform with:
<span class="quote">> INTEL_DEBUG=spill_vec4 INTEL_SCALAR_TCS=0</span >
    Or just launching on Haswell.
    If you add
<span class="quote">> hs.SingleProgramFlow = true;</span >
    to '3DSTATE_HS' the 'matches' will be zero most times but also not always.
    The incorrect values in these arrays are not garbage when mismatched but
copies of nearby values (saw this in one iteration of testing in RenderDoc).</pre>
        </div>
      </p>


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

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