<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:jason@jlekstrand.net" title="Jason Ekstrand <jason@jlekstrand.net>"> <span class="fn">Jason Ekstrand</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - nir clone test fails"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=98840">bug 98840</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;">Assignee</td>
           <td>jason@jlekstrand.net
           </td>
           <td>t_arceri@yahoo.com.au
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - nir clone test fails"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=98840#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - nir clone test fails"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=98840">bug 98840</a>
              from <span class="vcard"><a class="email" href="mailto:jason@jlekstrand.net" title="Jason Ekstrand <jason@jlekstrand.net>"> <span class="fn">Jason Ekstrand</span></a>
</span></b>
        <pre>This is really Tim's bug.  The problem occurred when he moved us to using
nir_gather_info.  When we start off, the nir_shader::info field points to
gl_program::info.  However, when the shader gets cloned, we ralloc a copy of
the shader_info and copy the data into that and nir_shader::info no longer
points to gl_program::info but points to a copy of the shader_info.  With
NIR_TEST_CLONE=1, nir_shader_gather_info gets run after some cloning has been
done and so the copied shader_info is what gets filled out and gl_program::info
gets left alone.  One hack solution is to just do "prog->info = *nir->info"
after we run nir_shader_gather_info, but I don't think this is a long-term
solution.

After going around in circles a bit, I think the answer is probably to make
nir_shader::info an embedded struct again and not a pointer.  Now that we use
the same shader_info struct in gl_program as we do in nir_shader, we can easily
pre-populate the one in nir_shader and, after we're done with our early NIR
optimization and we've run nir_shader_gather_info, we copy it back.</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>