<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 - [ivb] gpu hang on Star Ruler 2"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108179">bug 108179</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></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ivb] gpu hang on Star Ruler 2"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108179#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ivb] gpu hang on Star Ruler 2"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108179">bug 108179</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>Compiling the offending shader "ringworld_procedural_ps.txt" produces warnings
about uninitialized variable "atmoSteps".

<span class="quote">> atmoSteps = 4 - int(atmoSteps * 2.0);</span >
As could be seen in shader it is used without being initialized.

Later it is passed to cloudMaker function where is used for the loop as
iterations count.

Accessing uninitialized variable is a valid operation but yields undefined
result, "atmoSteps" became a huge value in some of invocations thus hanging the
GPU.  

GLSL 4.4 spec says:

<span class="quote">> Reading a variable before writing (or initializing) it is legal, however the value is undefined.</span >

I don't know what value it should be initialized to but initializing it
resolves the hang.</pre>
        </div>
      </p>


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

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>